schellingb / wajic

WebAssembly JavaScript Interface Creator
zlib License
194 stars 5 forks source link

Feature request, print messages with colors #6

Open staviq opened 2 years ago

staviq commented 2 years ago

This a very simple modification, for starters, warnings in yellow:

var WARN = function(msg)
{
//console.warn('[WARNING] ' + msg);
console.log('\x1b[1m\x1b[33m%s\x1b[0m', '[WARNING] ' + msg);  //yellow
};

There is a nice and handy reference for console colors: https://stackoverflow.com/a/41407246