Skip to content

Instantly share code, notes, and snippets.

@user24
Created September 1, 2011 21:56
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 user24/1187400 to your computer and use it in GitHub Desktop.
Save user24/1187400 to your computer and use it in GitHub Desktop.
debug in use
var debug = true;
function parseJSON(json) {
debug && console.log('parsing json');
if(typeof json == 'string') {
json = JSON.parse(json);
}
debug && console.log('got json', json);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment