3 ms·
> if your object has so many dynamically-computed properties that eagerly collecting them is a performance concern, then it should probably be a Map Should be,
by derefr 2y ago
> if your object has so many dynamically-computed properties that eagerly collecting them is a performance concern, then it should probably be a Map
Should be, but there's so much legacy code that is going to hand you objects.
Also, unless you go to a weirdly large amount of effort, JSON.parse will give you objects.
- tracker1 2y agoEven then... [Object] could just iterate [k,v] unless the behavior is overridden... even then that's probably appropriate for something like weakmap anyhow.