Skip to content

Instantly share code, notes, and snippets.

@edwardhotchkiss
Created August 17, 2013 04:10
Show Gist options
  • Save edwardhotchkiss/6255216 to your computer and use it in GitHub Desktop.
Save edwardhotchkiss/6255216 to your computer and use it in GitHub Desktop.
wrapper('logger', [], function() {
'use strict';
var _hasConsole = (typeof(window.console) === 'object');
return {
log: function(msg) {
if (!_hasConsole) {
return;
}
var log, args;
args = Array.prototype.slice.call(arguments);
log = Function.prototype.bind.call(console.log, console);
log.apply(console, args);
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment