index.js
function log() {
  var args = NS ? [chalk.bold.gray(NS)] : []
  for(var i=0; i<arguments.length; i++) {
    var arg = arguments[i];
    args.push(chalk.cyan( typeof arg === "object" ? JSON.stringify(arg) : arg ))

    // adds a separator
    if(i < arguments.length-1) args.push(chalk.gray("|"));
  }
  if(testLog)   testLog(args);
  else          console.log.apply(null, args)
}
function log() {
  var args = NS ? [chalk.bold.gray(NS)] : []
  for(var i=0; i<arguments.length; i++) {
    var arg = arguments[i];
    args.push(chalk.cyan( typeof arg === "object" ? JSON.stringify(arg) : arg ))

    // adds a separator
    if(i < arguments.length-1) args.push(chalk.gray("|"));
  }
  if(testLog)   testLog(args);
  else          console.log.apply(null, args)
}
function log ( ) { var args = NS ? [ chalk . bold . gray ( NS ) ] : [ ] for ( var i = 0 ; i < arguments . length ; i ++ ) { var arg = arguments [ i ] ; args . push ( chalk . cyan ( typeof arg === "object" ? JSON . stringify ( arg ) : arg ) ) // adds a separator if ( i < arguments . length - 1 ) args . push ( chalk . gray ( "|" ) ) ; } if ( testLog ) testLog ( args ) ; else console . log . apply ( null , args ) }
coloured console log
coloured console log