cconsole

simple colored console output

cconsole

Simple coloured console output.

Using npm:

$ npm install cconsole

cconsole('a string', noNewLine);

If noNewLine is false or omitted then a new line character is appended just like console.log, if this is set to true then process.stdout.write is used instead with no new line character at the end.

var cconsole = require('cconsole');
 
cconsole('here is some {red(red)} text');
 
/*
 
  supports the following tags:
 
  {bold(...)}
  {italic(...)}
  {red(...)}
  {blue(...)}
  {green(...)}
  {purple(...)}
  {cyan(...)}
  {yellow(...)}
  {gray(...)}
  {bg:red(...)}
  {bg:blue(...)}
  {bg:green(...)}
  {bg:purple(...)}
  {bg:cyan(...)}
  {bg:yellow(...)}
  {inverse(...)} // black on white
  {underline(...)}
  {grey(...)} // same as `gray` to account for different spellings
 
*/