Property ordering of [[Enumerate]] / getOwnPropertyNames()
john.david.dalton at gmail.com
Wed Sep 2 23:10:18 UTC 2015
> [Enumerate]] must obtain the own property keys of the target object as if
by calling its [[OwnPropertyKeys]] internal method
Whoa that's tricky language. I assumed reading it that [[Enumerable]] was
to follow the order of [[OwnPropertyKeys]] (as part of "as if by") and
walking the prototype chain.
It's odd to me that:
Reflect.ownKeys() has defined order but
I'm using Reflect.enumerate() to create a `keysIn` implementation (like
`keys` but for own & inherited key names).
:+1: for more defined behavior in ES7.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss