nulog
Switch off console.log
A custom logger to skip conditional statements when trying to mute logs.
If your code looks like this:
if !processenvTEST || !commandLineArgumentsquiet console;
You can now initialize a nulog
instance with a toggle variable that will
send your logs to /dev/null if false is passed.
var logger = !commandLineArgumentsquiet;logger;