Created
April 13, 2010 21:49
-
-
Save chrisjpowers/365129 to your computer and use it in GitHub Desktop.
Never have your javascript die from forgetting to take out console.log statements again!
This file contains 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
// If console is not defined (ie the browser isn't | |
// using developer extensions), this will keep console | |
// statements accidentally left in the code from | |
// causing errors for the end user. | |
// | |
if(console == null) { | |
var console = { | |
log: function() { | |
// do nothing | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment