zenparsing at gmail.com
Sat Jul 26 05:52:43 PDT 2014
> The rationale to remove Reflect.hasOwn was that it could easily be
> simulated via (Reflect.getOwnPropertyDescriptor(obj,name) !== undefined).
> While this conses a throw-away property descriptor object, the overhead was
> deemed insignificant.
Still, hanging "hasOwnProperty" off of Object.prototype was a mistake and a
is constant source of irritation. Perhaps the mistake could be rectified
by hanging the same functionality directly off of Object?
if (Object.hasOwn(obj, "foo")) doSomething();
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss