class without touching the console.log ? I have a class that has private members that contain a lot of useless information 99.9% of the time. I tried overriding toString but that doesn't work. only when it's added to a string.
example class
class A {
_dont_show = "a lot of uselss string"; // has reference to websocket which is also very verbose
show_me = "relevant data";
}
console.log(new A()+"");
Node?
Обсуждают сегодня