This is an extraction of Node's inspect
utility from the util
module, with two fundamental advantages:
- Single, focused module
- Compatible with all browsers and environments.
With browserify or node:
var inspect = require('util-inspect');
console.log(inspect({}));
MIT – Copyright (c) 2010-2014 Joyent, Inc.