evildebug
v1.0.0
Published
nodejs lazy debug module based on TJ Holowaychuk debug module
Downloads
1
Readme
evildebug
Nodejs lazy debug module based on Holowaychuk debug module
Installation
$ npm install evildebug
Motivations
I like to have the project name followed by the current filename by default (without file extension)
Example code using native debug module
process.env.DEBUG = '*';
const pkg = require('./package.json');
const path = require('path');
const debug = require('debug')(`${pkg.name}:${path.basename(__filename).replace(/\.js$/, '')}`);
debug('foo');
will output
myproject:run foo +0ms
Example code using evildebug module
process.env.DEBUG = '*';
const debug = require('evildebug');
debug('foo');
will output
myproject:run foo +0ms