1.0.3 • Published 6 years ago

std-nice v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

std-nice

std-nice is a tool to log objects in Node.js for dev environnement.

npm.io

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.

PluginGithub
Colorshttps://github.com/marak/colors.js/

Provided by

N|Solid

Contributors

g.neut a.emilien

License

MIT

1.0.3

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago