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).
constDEFAULT_FOO=1constflag=require('node-env-flag')constyep=flag(process.env.FOO,DEFAULT_FOO)if(yep){console.log("Foo!")}(value)flag(process.env.FOO);
(value, default)flag(process.env.FOO,1);
$ npm install node-env-flagLocal tests:
$ make testReleased under the MIT license.
Copyright (c) Jonas Grimfelt
