hide-console
A NPM package which lets user override and hide the console methods
Installation:
npm install hide-consoleor yarn add hide-console
Usage for React app:
import initHideConsole from "hide-console";
initHideConsole(<["log", ...]>)
You have to pass all the functions which needs to be overriden and hide console messages for
Examples:
- To hide log console messages
initHideConsole(["log"])
- To hide log, error, warn console messages
initHideConsole(["log", "error", "warn"])
- To hide error, warn console messages
initHideConsole(["error", "warn"])
Usage as JavaScript library
Download hide-console.min.js and include it as a script file inside your application and call initHideConsole() as shown in above examples