1.0.10 • Published 8 years ago
js-ddd v1.0.10
JS-DDD simple console logging like a Kint for php
This package created to help you to use browser console more intelligent and you don't have to carry about production console logs.
You can use just dd() for console table your object or ddd() for everything else.
Demo on the attached screenshot.
Installing
npm install --save js-ddd
How to use
import 'js-ddd';
dd() and ddd() will be automatically added to global "window" variable. So, you don't have to import this component each time when you are going to use it. If you are using eslint you should add to your .eslint file next config
"globals": {
"dd": true,
"ddd": true
}
If you don't want to add global variables to your eslint file you can import dd() or/and ddd() for each components like:
import {dd, ddd} from 'js-ddd';
Production app
When you run your application on production or stage server you can use for example:
NODE_ENV=production npm start
NODE_ENV=production will eliminate console logs from app.