Created
February 26, 2015 17:48
-
-
Save nkt/3a7250d5d81ed5128151 to your computer and use it in GitHub Desktop.
Simple function for node.js debugging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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