UNPKG

detect-environment

Version:

Detect environments in JavaScript similar to the way Laravel does

36 lines (27 loc) 619 B
'use strict'; var /** * */ isBase = function isBase (options, envName) { // if (!options) { throw new TypeError('isBase:'); } // if (!options.baseEnv || typeof options.baseEnv !== 'string') { throw new TypeError('isBase:'); } // if (!envName || typeof envName !== 'string') { throw new TypeError('isBase:'); } // if (envName === options.baseEnv) { return true; } // return false; }; // Expose to node.js module.exports = isBase;