Verification, sanitization, and type coercion for environment variables in Node.js
MIT License
asSet()
accessor (#173)Published by evanshortiss 6 months ago
Published by evanshortiss about 1 year ago
Fix 7.4.0 issues with create-react-app
polyfill (#168)
Published by evanshortiss about 1 year ago
process.env
by default in non-Node.js environments (#155)Published by evanshortiss over 1 year ago
Published by evanshortiss about 2 years ago
asEmailString()
typings (#160)Published by evanshortiss about 2 years ago
asEmailString()
accessor (#146)Published by evanshortiss almost 3 years ago
Published by evanshortiss almost 3 years ago
process.env
/record and remove unused type (#148)readonly T[]
generic use with asEnum()
Published by evanshortiss over 3 years ago
Published by evanshortiss almost 4 years ago
Published by evanshortiss over 4 years ago
asRegExp
accessor (#136)Published by evanshortiss over 4 years ago
accessors
property to the public API for use in building extraAccessors
(#121).editorconfig
(#129)extraAccesors
(#129)extraAccessors
args type error (#131)asUrlString()
and asUrlObject()
(#132)asUrlString()
to mention WHATWG URL behaviour (#126, #129)Published by evanshortiss over 4 years ago
Published by evanshortiss over 4 years ago
Published by evanshortiss over 4 years ago
Published by evanshortiss over 4 years ago
required()
, convertFromBase64()
, etc. with ExtensionFn
.Published by evanshortiss over 4 years ago
default()
so that it correctly returns an empty string value if provided.Published by evanshortiss over 4 years ago
default(value)
function.Published by evanshortiss over 4 years ago
example(string)
function.default(string)
function.required()
until an accessor such as asString()
is invoked.required()
was undefined on a IPresentVariable
.Migration from 5.x to 6.0.0 should be smooth. Change any instance of
env.get(target, default)
to env.get(target).default(default)
. For example:
// Old 5.x code
const emailAddr = env.get('EMAIL_ADDR', '[email protected]').asString()
// New 6.x compatible code
const emailAddr = env.get('EMAIL_ADDR').default('[email protected]').asString()