NODE-ENV-FLAG
Little util function for simpler extracting Boolean
values from ENV
variables in Node.js, i.e. true
values (true
, TRUE
, 1
) vs. false
values (false
, FALSE
, 0
).
Example
var DEFAULT_FOO = 1; var flag = ; var yep = ; if yep console
API
-
(value)
; -
(value, default)
;
Installation
$ npm install node-env-flag
Test
Local tests:
$ make test
License
Released under the MIT license.
Copyright (c) Jonas Grimfelt