asenv
Version:
NODE_ENV accessor
19 lines (15 loc) • 324 B
JavaScript
/**
* Do unless production
* @function unlessProduction
* @param {function} handler
*/
const isProduction = require('./is_production')
/** @lends unlessProduction */
function unlessProduction (handler) {
if (isProduction()) {
return false
}
return handler()
}
module.exports = unlessProduction