Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/aliataf/log
- Owner: aliataf
- License: other
- Created: 2021-05-31T10:42:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-17T18:00:43.000Z (over 3 years ago)
- Last Synced: 2024-10-28T22:22:55.335Z (3 months ago)
- Topics: debugging, javascript, logging, npm, npm-package
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@aliataf/log
- Size: 3.91 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)