Saturday, 9 February 2019

Question: How do I control the way a class gets rendered in the terminal?

I use the following syntax to log to the console: console.log('variable_name', variable)Now that I have changed one of my classes to use Uint8ClampedArray rather than Buffer, it takes many lines of console output rather than just one, which makes log output much harder to read quickly.​I have tried overloading the object's toString(), but that didn't work. Is there a way to modify the way the node displays the way a class (or other object) is logged?

Submitted February 09, 2019 at 09:33PM by jsgui

No comments:

Post a Comment