1.0.0 • Published 2 years ago

@sshahzaiib/no-console v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

No console in Production

Disable all consoles in the production environments

Installation


Using yarn

yarn add @sshahzaiib/no-console

Using npm

npm i @sshahzaiib/no-console

Usage


Note: You need to set "NODE_DEBUG" environment variable to true when running node server in prod mode to see logs.

const noConsole = require('@sshahzaiib/no-console);
or
import noConsole from '@sshahzaiib/no-console';

... 

noConsole(); // no console logs after this state in production if NODE_DEBUG is not set to true