chalkproxy

1.1.1 • Public • Published

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

Build Status

npm Version

npm version

npm big badge

NPM

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);
}

/chalkproxy/

    Package Sidebar

    Install

    npm i chalkproxy

    Weekly Downloads

    2

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    12 kB

    Total Files

    10

    Last publish

    Collaborators

    • cbuteau