chalkproxy
v1.1.1
Published
Creates chalk helper object for colorized output.
Downloads
3
Readme
ChalkProxy
Background
I love using chalk in projects and keeps creating a wrapper around it so I can easily call chalk.red.bold or whatever to get the result.
The idea is this allows you to create a custom wrapper for your own projects.
Badges/Status
Travis
npm Version
npm big badge
Usage
var chalkproxy = require('chalkproxy');
var mychalk = chalkproxy.create({
good: 'green',
bad: 'red.bold'
});
console.log(mychalk.good('We got this far.'));
try {
throw new Error('Just testing')
} catch (e) {
console.log(mychalk.bad(e.message));
}
Added new method that calls console log.
var chalkproxy = require('chalkproxy');
var mychalk = chalkproxy.createLog({
good: 'green',
bad: 'red.bold'
});
mychalk.good('We got this far');
try {
throw new Error('Just testing')
} catch (e) {
mychalk.bad(e.message);
}