Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aliataf/log

Fast way to distinct your variables logged
https://github.com/aliataf/log

debugging javascript logging npm npm-package

Last synced: about 2 months ago
JSON representation

Fast way to distinct your variables logged

Awesome Lists containing this project

README

        

# 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:

```js
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](https://www.npmjs.com/package/@aliataf/log):

```bash
npm i --save-dev @aliataf/log
```

## Usage

```javascript
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](https://github.com/aliataf/log/blob/main/LICENSE) © [Ali Ataf](https://github.com/aliataf)