> > > 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. > > Sounds good.
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();
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss