Inspect

Its quite annoying to find your console print [object Object] when you passed an object as your argument.

Tampered Console has a built in inspect property from Node.js' util.inspect() module to elucidate your object to the console.

To inspect your argument, add an inspect property before the method.

const Console = require('tampered-console');
Console.inspect.log(obj);

This is also accessible in global console if the fancy option is enabled in the override options.

const Console = require('tampered-console');
Console.globalConsole();
console.inspect.log(obj);

This feature limits your argument input. All other succeeding arguments are assumed to be inspect options.

Last updated

Was this helpful?