Last active
September 18, 2016 04:20
-
-
Save NewFuture/35ccebdd49f47ebadcd5a7f279923908 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var log = function() { | |
setTimeout(console.log.bind.apply(console.log, [null].concat(Array.prototype.slice.call(arguments)))); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var YYF_CONSOLE = { | |
_console: function(method) { | |
return function() { | |
setTimeout(console[method].bind.apply(console[method], [console].concat(Array.prototype.slice.call(arguments)))); | |
} | |
} | |
}; | |
['assert','clear','count','debug','dir','dirxml','error','group','groupCollapsed','groupEnd','info','log','profile','profileEnd','time','timeEnd','timeStamp','warn'].forEach(function(method) { | |
YYF_CONSOLE[method] = YYF_CONSOLE._console(method); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment