/**
 * Tiny env var resolver
 *
 * !!! PRECEDENCE MATTERS !!!
 *
 * example (from lowest priority to highest):
 *     .env
 *     < ```COMMAND_LINE_DECLARED node server.js```
 *     < ```node server.js --command_line_declared``` (case-insensitive)
 */

// precedence 0 (defaults)
const dotenv = require('dotenv').config().parsed;

// precedence 1 (COMMAND_LINE_DECLARED=true node server.js)
const node_env = process.env;

// precedence Infinity (node server.js --command_line_declared true)
const argv = require('yargs').argv;
// add upper-cased versions of command-line-supplied arguments
Object.keys(argv).forEach(k => argv[k.toUpperCase()] = argv[k]);

// export a new object
module.exports = Object.assign({}, dotenv, node_env, argv);

@@ -384,16 +384,39 @@
 ver.js)%0A
+//  (and node globals)%0A
 const no
@@ -456,16 +456,9 @@
 nce 
-Infinity
+2
  (no

Comment update.