lib/index.js
function initVar (key, envKey, def) {
        var negate = !def;
        switch (true) {
            case cacheObj.hasOwnProperty(key):
                return cacheObj[key];
            case process.env.hasOwnProperty(envGlobalCacheKey):
                return process.env[envGlobalCacheKey] !== '';
            case process.env.hasOwnProperty(envKey):
                return negate ? process.env[envKey] === 'YES' : process.env[envKey] !== 'NO';
            default:
                return def;
        }
    }
function initVar (key, envKey, def) {
        var negate = !def;
        switch (true) {
            case cacheObj.hasOwnProperty(key):
                return cacheObj[key];
            case process.env.hasOwnProperty(envGlobalCacheKey):
                return process.env[envGlobalCacheKey] !== '';
            case process.env.hasOwnProperty(envKey):
                return negate ? process.env[envKey] === 'YES' : process.env[envKey] !== 'NO';
            default:
                return def;
        }
    }
function initVar ( key , envKey , def ) { var negate = ! def ; switch ( true ) { case cacheObj . hasOwnProperty ( key ) : return cacheObj [ key ] ; case process . env . hasOwnProperty ( envGlobalCacheKey ) : return process . env [ envGlobalCacheKey ] !== '' ; case process . env . hasOwnProperty ( envKey ) : return negate ? process . env [ envKey ] === 'YES' : process . env [ envKey ] !== 'NO' ; default : return def ; } }
cache variable initializer
@param {String} key
@param {String} envKey
@param {Boolean} def
@returns {Boolean}
cache variable initializer