Nodejs: __call implementation available?

I need at least such an atm function:

function ExampleClass() { } ExampleClass.prototype.__noSuchMethod__ = function() { console.log("No such method, maybe you should try reading the docs?"); } example = new ExampleClass(); example.eatPizza(); 

Is it not yet implemented in v8, or at least emulated differently?

Has anyone implemented such a feature in their projects?

thanks

+4
source share
1 answer

There was a similar question in StackOverflow, you can find the answer:

The capture method is missing in Javascript and do some logic?

+2
source

Source: https://habr.com/ru/post/1386264/


All Articles