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.

TAKE NOTE Enabling this property limits your argument input. Only use this to elucidate objects.

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