Put var p = require('prettyput')
into your source code.
p.p(obj);
p.pp([str,obj,arr]);
Output is just like console.log.
var obj =
{
a:'A',
b:'B',
c:{
d:'D',
e:{
f:'F'
}
}
}
p.o(obj);
output
{
a:A
b:B
c:{
d:D
e:{
f:F
}
}
}
var arr = [6,4,3,9,5];
p.a(arr);
output
[0] -> 6
[1] -> 4
[2] -> 3
[3] -> 9
[4] -> 5
p.e(err);
Check err value and output it when err contain some value.