Skip to content

Instantly share code, notes, and snippets.

@garystorey
Created August 12, 2014 17:58
Show Gist options
  • Select an option

  • Save garystorey/20ad49888d3e3c598122 to your computer and use it in GitHub Desktop.

Select an option

Save garystorey/20ad49888d3e3c598122 to your computer and use it in GitHub Desktop.
/*
* Debug utilities
* @see https://gist.github.com/mkretschek/611475412faa996ef73d
*/
var $dbg;
(function () {
$dbg = {};
// Lists all properties in the given object.
// Based on a snippet Samuel sent to me.
$dbg.inspect = function (obj) {
console.log('\n');
console.log('obj');
for (prop in obj) {
console.log(' .' + prop + ': ' + obj[prop] + '\n');
}
console.log('\n');
};
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment