André Bargull (2014-06-11T15:49:52.000Z)
domenic at domenicdenicola.com (2014-06-20T19:24:42.905Z)
On 6/11/2014 5:40 PM, Alexandre Morgaut wrote: > Not sure Proxy solve anything when we want to test the constructor nature of a function and be sure invoking it won't change anything in the current application context From [1]: ```javascript function IsConstructor(o) { try { new (new Proxy(o, {construct: () => ({})})); return true; } catch(e) { return false; } } ``` This IsConstructor implementation does not trigger any side-effects and works even when the underlying constructor requires arguments etc. [1]: https://github.com/anba/es6draft/blob/master/src/test/scripts/suite/lib/assert.js#L53