Skip to content

Instantly share code, notes, and snippets.

@nkt
Created February 26, 2015 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nkt/3a7250d5d81ed5128151 to your computer and use it in GitHub Desktop.
Save nkt/3a7250d5d81ed5128151 to your computer and use it in GitHub Desktop.
Simple function for node.js debugging
function dump(what, depth, colors) {
var util = require('util');
console.log(util.inspect(what, {
depth: depth || 2,
colors: colors === undefined ? true : colors
}));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment