asenv
Version:
NODE_ENV accessor
21 lines (16 loc) • 1.39 kB
JavaScript
/**
* Do unless production
* @function unlessProduction
* @param {function} handler
*/
;
var isProduction = require('./is_production');
/** @lends unlessProduction */
function unlessProduction(handler) {
if (isProduction()) {
return false;
}
return handler();
}
module.exports = unlessProduction;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVubGVzc19wcm9kdWN0aW9uLmpzIl0sIm5hbWVzIjpbImlzUHJvZHVjdGlvbiIsInJlcXVpcmUiLCJ1bmxlc3NQcm9kdWN0aW9uIiwiaGFuZGxlciIsIm1vZHVsZSIsImV4cG9ydHMiXSwibWFwcGluZ3MiOiJBQUFBOzs7OztBQUtBOztBQUVBLElBQU1BLFlBQVksR0FBR0MsT0FBTyxDQUFDLGlCQUFELENBQTVCO0FBRUE7OztBQUNBLFNBQVNDLGdCQUFULENBQTJCQyxPQUEzQixFQUFvQztBQUNsQyxNQUFJSCxZQUFZLEVBQWhCLEVBQW9CO0FBQ2xCLFdBQU8sS0FBUDtBQUNEOztBQUNELFNBQU9HLE9BQU8sRUFBZDtBQUNEOztBQUVEQyxNQUFNLENBQUNDLE9BQVAsR0FBaUJILGdCQUFqQiIsInNvdXJjZVJvb3QiOiIuLi9saWIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIERvIHVubGVzcyBwcm9kdWN0aW9uXG4gKiBAZnVuY3Rpb24gdW5sZXNzUHJvZHVjdGlvblxuICogQHBhcmFtIHtmdW5jdGlvbn0gaGFuZGxlclxuICovXG4ndXNlIHN0cmljdCdcblxuY29uc3QgaXNQcm9kdWN0aW9uID0gcmVxdWlyZSgnLi9pc19wcm9kdWN0aW9uJylcblxuLyoqIEBsZW5kcyB1bmxlc3NQcm9kdWN0aW9uICovXG5mdW5jdGlvbiB1bmxlc3NQcm9kdWN0aW9uIChoYW5kbGVyKSB7XG4gIGlmIChpc1Byb2R1Y3Rpb24oKSkge1xuICAgIHJldHVybiBmYWxzZVxuICB9XG4gIHJldHVybiBoYW5kbGVyKClcbn1cblxubW9kdWxlLmV4cG9ydHMgPSB1bmxlc3NQcm9kdWN0aW9uXG4iXX0=