Drop-in replacement for Node.js console
Simply load the module at the beginning of your file and any subsequent call to one of the following console method will produce a colorful and more readable output.
- console.log
- console.error
- console.warn
- console.info
- console.dir
- console.memory (extra method)
npm i cheer-up-console
require('cheer-up-console')(options);
Options should be passed as a json object.
Param | Accepted values | default |
---|---|---|
enabled | true or false | true |
silent | true, false, list | true |
The silent param can also accept a list of console methods that you want to silence.
For example, if you want to silence all the console.log and console.info,
you can pass the param ['log', 'info']
. All the other console methods
will continue to produce an output.