wana icon indicating copy to clipboard operation
wana copied to clipboard

Object.keys observes value changes

Open aleclarson opened this issue 6 years ago • 1 comments

Ideally, the Object.keys shim should only observe key changes (eg: when a key is added or removed). Currently, it observes value changes too (eg: when a key is set to a new value).

Note: This goes for Map.prototype.keys as well.

aleclarson avatar Aug 25 '19 16:08 aleclarson

Q: Should using Object.keys on an array observe its length or its sparse indices? Probably the latter, since that's what affects the result of Object.keys.

aleclarson avatar Aug 25 '19 17:08 aleclarson