es6-turbo-logger
v0.0.4
Published
Useful logger for ES6 applications. Replaces the standard console.log function.
Downloads
12
Readme
es6-turbo-logger
Useful logger for ES6 applications. It provides log() function that replaces the standard console.log() function and outputs passed arguments in browser console as a group, indicating the names of the variables/constants that were passed. Optionally, you can specify group label.
Getting Started
Install it via npm:
npm install es6-turbo-logger
And include in your project:
import log from 'es6-turbo-logger';
Then use log() function instead standard console.log(), passing objects as a first argument in object wrapper:
const a = 'Hello';
let b = 'World';
const c = a.b;
log({a,b,c});
In the browser console it will look like this:
Optionally you can specify group label as a second argument:
const a = 'Hello';
let b = 'World';
const c = a.b;
log({a,b,c}, 'Group Label');
In the browser console it will look like this:
License
MIT