Skip to content

Instantly share code, notes, and snippets.

@stuf
Created October 15, 2014 07:06
Show Gist options
  • Save stuf/69ce38145a5e8e2192ed to your computer and use it in GitHub Desktop.
Save stuf/69ce38145a5e8e2192ed to your computer and use it in GitHub Desktop.
(function () {
var
noop = function () {},
args = [
'log', 'info', 'warn', 'error', 'debug', 'trace', 'dir', 'group', 'groupCollapsed',
'groupEnd', 'time', 'timeEnd', 'profile', 'profileEnd', 'dirxml', 'assert',
'count', 'markTimeline', 'timeStamp', 'clear'
];
if (!('console' in window)) {
window.console = {};
}
_.each(args, function (arg) {
if (window.console[arg] == null) {
window.console[arg] = noop;
}
});
}).call();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment