Files
archived-nodemon/lib/utils/index.js
Remy Sharp d092d71775 Ignore .git & node_modules/**/node_modules by default. Closes #230
Also linting, tests and cleaned up filename that's echoed triggering the change
2013-12-05 00:12:24 +00:00

27 lines
609 B
JavaScript

var noop = function () {};
var utils = module.exports = {
clone: require('./clone'),
merge: require('./merge'),
log: require('./log'),
bus: require('./bus'),
isWindows: process.platform === 'win32',
home: process.env.HOME || process.env.HOMEPATH,
quiet: function () {
// nukes the logging
if (!this.debug) {
Object.keys(this.log).forEach(function (method) {
this.log[method] = noop;
}.bind(this));
}
}
};
Object.defineProperty(utils, 'debug', {
set: function (value) {
this.log.debug = value;
},
get: function () {
return this.log.debug;
}
});