Skip to content

Instantly share code, notes, and snippets.

@simoncoulton
Created February 24, 2015 03:04
Show Gist options
  • Save simoncoulton/427c8ed45055b485ae9b to your computer and use it in GitHub Desktop.
Save simoncoulton/427c8ed45055b485ae9b to your computer and use it in GitHub Desktop.
console.log() always
(function (con) {
var method;
var dummy = function() {};
var methods = ('assert,count,debug,dir,dirxml,error,exception,group,' +
'groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,' +
'time,timeEnd,trace,warn').split(',');
while (method = methods.pop()) {
con[method] = con[method] || dummy;
}
})(window.console = window.console || {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment