Skip to content

acecor-cotep/std-nice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@cotep/std-nice

@cotep/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 --save @cotep/std-nice

Example

Require std-nice

const stdnice = require('@cotep/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 '@cotep/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('@cotep/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

N|Solid

Contributors

g.neut a.emilien

License

MIT

About

Display anything nicely on the console

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •