Created
April 26, 2012 14:38
-
-
Save juliocesar/2499995 to your computer and use it in GitHub Desktop.
console.log filter
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
// Monkey patch: If the last argument to console.log is `false`, nothing is outputted. | |
(function(log) { | |
console.log = function() { | |
if (arguments[arguments.length - 1] === false) return; | |
return log.apply(console, arguments); | |
} | |
})(console.log); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment