Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.
/ js-ddd Public archive

JS simple console logging like a Kint for php

Notifications You must be signed in to change notification settings

bogdan-bodnaruk/js-ddd

Repository files navigation

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.

js-ddd

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.

About

JS simple console logging like a Kint for php

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published