Created
September 1, 2011 21:56
-
-
Save user24/1187400 to your computer and use it in GitHub Desktop.
debug in use
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
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