Skip to content

Instantly share code, notes, and snippets.

@jakiestfu
Created June 23, 2013 16:18
Show Gist options
  • Save jakiestfu/5845558 to your computer and use it in GitHub Desktop.
Save jakiestfu/5845558 to your computer and use it in GitHub Desktop.
var log = (function() {
var _log = console ? console.log.bind(console) : Function.prototype.valueOf();
return function() {
if (exports.debug) {
var args = Array.prototype.slice.call(arguments);
_log.apply(null, args);
}
};
})(),
warn = (function() {
var _warn = console ? console.warn.bind(console) : Function.prototype.valueOf();
return function() {
var args = Array.prototype.slice.call(arguments);
_warn.apply(null, args);
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment