Skip to content

Instantly share code, notes, and snippets.

@jccrosby
Created July 24, 2012 14:06
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 jccrosby/3170078 to your computer and use it in GitHub Desktop.
Save jccrosby/3170078 to your computer and use it in GitHub Desktop.
Degrade/Quiet console
console = {};
var i, max, funcs = [
'log', 'debug', 'info', 'warn', 'error', 'assert', 'dir', 'dirxml',
'trace', 'group', 'groupCollapsed', 'groupEnd', 'time', 'timeEnd',
'profile', 'profileEnd', 'count'
];
for( i = 0, max = funcs.length; i < max; i++ ) {
console[ funcs[ i ] ] = function(){};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment