Closed ajvincent closed 3 years ago
That's not what I meant. I was thinking more along the lines of Object.create(), where we can specify the prototype of the object we're creating. But such a capability doesn't exist in Object.fromEntries()...
We explicitly decided not to do that in Object.fromEntries, and I assume we'd want the same decision here. Inheritance is done via class extends
; the ES5 attempt to introduce the Object.create patterns never went anywhere.
"own" typically means enumerable own properties, ie, Object.keys/entries. (
Reflect.ownKeys
is an exception, but Reflect is weird and i don't think it counts).