1.0.0 • Published 3 years ago
diplog v1.0.0
deeplog - a simple, yet powerful library to print objects with nested fields
When debugging we have to deal with complex objects. Default console.log() doesn't show nested fields after 2nd level
const deeplog = require('./index');
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' } } }
}
}
}
}
}
}
}
}
1.0.0
3 years ago