diff options
Diffstat (limited to 'src/modules/console.js')
-rw-r--r-- | src/modules/console.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/modules/console.js b/src/modules/console.js new file mode 100644 index 0000000..7112071 --- /dev/null +++ b/src/modules/console.js @@ -0,0 +1,27 @@ +let new_console = { + ...console +} + +let orig_console = console; + +new_console.ok = (...args) => { + orig_console.log('\x1b[92m%s\x1b[0m', ...args) +} + +new_console.misc = (...args) => { + orig_console.warn('\x1b[90m%s\x1b[0m', ...args) +} + +new_console.info = (...args) => { + orig_console.warn('\x1b[94m%s\x1b[0m', ...args) +} + +new_console.warn = (...args) => { + orig_console.warn('\x1b[93m%s\x1b[0m', ...args) +} + +new_console.error = (...args) => { + orig_console.error('\x1b[91m%s\x1b[0m', ...args) +} + +module.exports = new_console; |