Hello,
I am unable to call a node.js native function through a No-op forwarding proxy.
The following case works properly with a v8 native function:
var p = new Proxy(Math, {});
console.log( p.cos.toString() ); // function cos() { [native code] }
console.log( p.cos(0) ); // 1
Whereas the following case throw TypeError: Illegal invocation
var p = new Proxy(require('os'), {});
console.log( p.cpus.toString() ); // function getCPUs() { [native code] }
console.log( p.cpus() ); // TypeError: Illegal invocation
what's wrong ?