我至少需要这样的功能 atm:
function ExampleClass() {
}
ExampleClass.prototype.__noSuchMethod__ = function() {
console.log("No such method, maybe you should try reading the docs?");
}
example = new ExampleClass();
example.eatPizza();
它还没有在 v8 中实现或以其他方式模拟吗?
有人在他们的项目中实现过这样的功能吗?
谢谢
最佳答案
StackOverflow 上有一个类似的问题,你可以在那里找到答案:
关于javascript - Node : __call implementation available?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8501602/