Reflect.hasOwn() ?

Axel Rauschmayer axel at
Sat Jul 26 10:15:08 PDT 2014

> Overall, I'm leaning towards keeping the built-in Reflect API minimal. There's room for many more utility methods (Reflect.getPropertyDescriptors comes to mind) which can all be expressed as a library.

After thinking about it some more, I agree w.r.t. these two examples:

* As far as I can tell, `hasOwnProperty` is mainly used to implement maps via objects. `Map` will eliminate this use case.
* `getPropertyDescriptors` is useful for cloning objects via `Object.create()`, where `Object.assign` can often be used in ES6.

Dr. Axel Rauschmayer
axel at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list