Easy object inspection.
Because I was tired of copying this code around.
Here's a full example of how to use
var inspect = require'pretty-inspect'ilog = inspect.log;var obj ='this': 'is'very: 'handy'a: 1b: 2c: 3d: 'This is a very long value'e:f:g:h:key: 'not shown if you limit depth to lower than 4';// inspect.log() writes to the consoleilogobj;// while inspect() only returns the string and you need to log it yourselfconsole.loginspectobj;ilogobj 3; // limit to object depth 3ilogobj 10 true; // show object in multiline form
Released under the MIT License.