Skip to content

Instantly share code, notes, and snippets.

@frostney
Created November 19, 2012 21:19
Show Gist options
  • Save frostney/4114006 to your computer and use it in GitHub Desktop.
Save frostney/4114006 to your computer and use it in GitHub Desktop.
HTML5 Boilerplate plugins.js in Coffeescript
do ->
noop = ->
methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeStamp', 'trace', 'warn']
console = (window.console or= {})
for i in [0..methods.length]
method = methods[i]
console[method] or= noop
true # Don't return the array of console objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment