Skip to content

Commit

Permalink
Add clarifying note about default values
Browse files Browse the repository at this point in the history
  • Loading branch information
af committed Jan 30, 2021
1 parent f581385 commit f7e69be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ url, email address). To these ends, the following validation functions are avail
Each validation function accepts an (optional) object with the following attributes:

* `choices` - An Array that lists the admissable parsed values for the env var.
* `default` - A fallback value, which will be used if the env var wasn't specified.
Providing a default effectively makes the env var optional.
* `default` - A fallback value, which will be present in the output if the env var wasn't specified.
Providing a default effectively makes the env var optional. Note that `default`
values are not passed through validation logic.
* `devDefault` - A fallback value to use *only* when `NODE_ENV` is _not_ `'production'`. This is handy
for env vars that are required for production environments, but optional
for development and testing.
Expand Down

0 comments on commit f7e69be

Please sign in to comment.