Changelog
6.0.1 (12/02/2020)
default(value)
function.Changelog
6.0.0 (12/02/2020)
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', 'admin@example.com').asString()
// New 6.x compatible code
const emailAddr = env.get('EMAIL_ADDR').default('admin@example.com').asString()
Changelog
5.2.0 (22/11/2019)
required()
function now verifies the variable is not an empty stringChangelog
5.1.0 (09/09/2019)
Changelog
5.0.0 (14/06/2019)
asArray()
are now more intuitive & consitentasUrlString()
and asUrlObject
now use the built-in URL
class in Node.js
to perform validationChangelog
4.1.0 (14/06/2019)
asPortNumber()
functionChangelog
4.0.1 (24/05/2019)
process.env
typings to env.from
Changelog
4.0.0 (09/04/2019)
.env.mock()
to env.from()
env.mock
Changelog
3.5.0 (02/29/2019)
required()
to support boolean paramter to bypass the check