node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

consoler

logo consoler npm

another smart and colorful console logger

screenshot

How to install

$ npm install consoler

Sample code

var consoler = require('consoler');
 
// check out in your console 
consoler.log('success','hey dude, well done !');
 
// or use default tag 
consoler.log('hey dude, well done !');
 
// or use shortcuts 
consoler.success('success!');
consoler.error('fail!');
consoler.loading('wait a moment!');

Run demos

$ git clone https://github.com/turingou/consoler.git
$ cd consoler/demo
$ node demo.js

Text align

text align defalut length is 8, try to change edge length like this:

consoler.align(20);

Colors Map

feel free to add your labels and colors in ./colors.json or add your event and the color

var consoler = require('consoler');
consoler.add('alldone','green');

Run unit-test (Mocha)

$ git clone https://github.com/turingou/consoler.git
$ cd consoler
$ npm install 
$ npm test