std-nice
v1.0.3
Published
NodeJS tool for fancy object display.
Downloads
2
Readme
std-nice
std-nice
is a tool to log objects in Node.js for dev environnement.
Installation
std-nice requires Node.js v8+ to run.
Install and start to code.
$ npm i std-nice
Example
Require std-nice
const stdnice = require('std-nice');
const mongoose = require('mongoose');
const obj = {
_id: mongoose.Types.ObjectId('4edd40c86762e0fb12000003'),
messages: [{
type : 1,
value: "fefzfzefzef",
}, {
type : 0,
value: "aaaaaaaaaa",
}],
};
obj.reference = obj;
stdnice.sd(obj);
stdnice.sd([]);
stdnice.sd(42);
Import std-nice
import stdnice from 'std-nice';
const obj = {
messages: [{
type : 1,
value: "fefzfzefzef",
}, {
type : 0,
value: "aaaaaaaaaa",
}],
};
stdnice.sd(obj);
You can use it globally
In your index.js :
global.LOG = require('std-nice');
In foo.js :
const messages: [{
type : 1,
value: "fefzfzefzef",
}, {
type : 0,
value: "aaaaaaaaaa",
}];
global.LOG.sd(messages);
Plugins
std-nice is currently extended with the following plugins.
| Plugin | Github | | ------ | ------ | | Colors | https://github.com/marak/colors.js/ |
Provided by
Contributors
g.neut a.emilien
License
MIT