-
-
Save v0lkan/520198942f69f6f99442 to your computer and use it in GitHub Desktop.
A shim for the console.wtf functionality (hoping that somebody natively implements that feature in the future ;))
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
// ## Every console needs a WTF prompt. | |
// | |
// Usage: | |
//console.wtf('This should not have happened AT ALL!', param1, param2); | |
// Check if `console.wtf` is natively supported. | |
if (!console.wtf) { | |
console.wtf = function() { | |
console.warn.apply(console, | |
['(W)hat a (T)errible (F)ailure »» '].concat( | |
Array.prototoype.slice.call(arguments) | |
) | |
); | |
}; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment