UNPKG

detect-environment

Version:

Detect environments in JavaScript similar to the way Laravel does

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