new-console
v1.0.8
Published
to optimize console
Downloads
22
Maintainers
Readme
## Installation
$ npm install new-console
var log = require('new-console');
Features
- colored console with time stamp
- log,error,warning,time,timeEnd with timestamp and color
- check data type of variable
sample code
var log=require('new-console');
var xyz=10;
log(" Hello World "); // Tue Feb 05 2019 14:20:10 GMT+0530 (IST) Hello World
log("type is",log.type(10)); // Tue Feb 05 2019 14:20:11 GMT+0530 (IST) type is number
log.stime('do_it');
function do_it(){
for(var i=0;i<899;i++){
}
}
log.etime('do_it'); // Tue Feb 05 2019 14:20:12 GMT+0530 (IST) do_it: 15ms
log.warn("waring message"); // Tue Feb 05 2019 14:20:12 GMT+0530 (IST) waring message
log.er("error message"); // Tue Feb 05 2019 14:20:12 GMT+0530 (IST) error message
log.Grn("This is Green color console"); // Tue Feb 05 2019 14:20:12 GMT+0530 (IST) This is Green color console
log.Red(" This is Red Color Console "); // Tue Feb 05 2019 14:20:12 GMT+0530 (IST) This is Red color console
log.Pnk(" This is pink Color Console "); // Tue Feb 05 2019 14:20:12 GMT+0530 (IST) This is pink color console
log.Brn(" This is Brown Color Console "); // Tue Feb 05 2019 14:20:12 GMT+0530 (IST) This is Brown color console
log.Ocn(" This is Ocean Color Console "); // Tue Feb 05 2019 14:20:12 GMT+0530 (IST) This is Ocean color console
log.Grey(" This is Grey Color Console "); // Tue Feb 05 2019 14:20:12 GMT+0530 (IST) This is Grey color console