Example #1
0
 return function (d) {
     if(conf.debug || conf.verbose) {
         var data = d ? d.toString().split('\n') : [];
         print(chalk[c](data.filter(function (el) {
             return el.length > 0;
         }).join('\n')));
     }
 }
Example #2
0
function statusColor(code)
{
    var c = "green";

    if (code >=300 && code < 400) {
        c = "blue";
    }
    if (code >=400 && code < 600) {
        c = "red";
    }
    return chalk[c] (code.toString());
}
Example #3
0
export default methods => str => methods.reduce((p, c) => chalk[c](p), str);