Skip to content

aliataf/log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Log

Fast way to destinct your variables logged

Motivation

I always find my self writing console.log statements with the name of the variable for example:

let language = 'Javascript';
console.log('language', language);

So in order to save time, I created this little package that logs the name of the variable automatically.

Installation

Install with npm:

npm i --save-dev @aliataf/log

Usage

import log from '@aliataf/log';

const firstName = 'Ali';
const lastName = 'Ataf';
const language = 'Javascript';

log({ language });
/* =>
    language = Javascript
*/

log({ firstName, lastName });

/* =>
    firstName = Ali
    lastName = Ataf
*/

License

MIT © Ali Ataf