Created
October 25, 2021 18:04
-
-
Save DiegoFleitas/b5fd9a3b42369aa6df2aa74d256d1619 to your computer and use it in GitHub Desktop.
colored js console
This file contains hidden or 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
let _error = global.console.error; | |
global.console.error = function() { | |
var args = arguments; | |
args[0] = '\x1b[31m\x1b[1m' + 'Error: ' + '\x1b[93m' + args[0] + '\x1b[0m'; | |
return _error.apply(null, args); | |
} | |
console.error('Whoops', 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment