soo-logger
v1.0.2
Published
Screw [Object, Object]
Downloads
3
Readme
soo-logger
Screw [Object, Object]
I hate trying to debug with the console and only seeing partial data, with the rest falling into [Object] blocks. This is an attempt to fix that.
soo-logger
turns this:
{ dog:
{ name: 'kylo',
breeds: [ [Object], [Object] ],
siblings: [ [Object] ] } }
into this:
{
"dog": {
"name": "kylo",
"breeds": [
{
"breed": "Lab"
},
{
"breed": "Pit Bull"
}
],
"siblings": [
{
"name": "Leia",
"breeds": [
{
"breed": "Border Collie"
}
]
}
]
}
}
Usage:
$ yarn add soo-logger
const soo = require('soo-logger');
const data = {
dog: {
name: 'kylo',
breeds: [
{
breed: 'Lab',
},
{
breed: 'Pit Bull',
},
{
breed: 'Doofus',
},
],
},
};
console.log(data) // => Prints garbage.
soo(data); // => Prints what you would expect.