1.0.1 • Published 3 years ago
diplog1 v1.0.1
deeplog - a simple, yet powerful library to print objects with nested fields
When debugging our code we might have to deal with complex objects. Default console.log() doesn't show nested fields after 2nd level
const deeplog = require('diplog');
const obj = {
a: {
very: {
deep: {
object: {
with: {
lots: {
of: {
nested: {
fields: {
value: 'a value'
}
}
}
}
}
}
}
}
}
};
deeplog(obj);
// on console
{
data: {
a: {
very: {
deep: {
object: {
with: {
lots: {
of: { nested: { fields: { value: 'a value' } } }
}
}
}
}
}
}
}
}