Created
September 11, 2014 12:43
-
-
Save stuf/7898f227856c640cac12 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 noop = function () {}; | |
if (!('console' in window)) | |
window.console = {}; | |
_([ | |
"log", "info", "warn", "error", "debug", "trace", "dir", "group", "groupCollapsed", | |
"groupEnd", "time", "timeEnd", "profile", "profileEnd", "dirxml", "assert", | |
"count", "markTimeline", "timeStamp", "clear" | |
]).each(function (it) { | |
if (!_.isFunction(window.console[it])) | |
window.console[it] = noop; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment