tc39 / proposal-upsert

ECMAScript Proposal, specs, and reference implementation for Map.prototype.upsert
https://tc39.es/proposal-upsert/
MIT License
202 stars 14 forks source link

Normative: Use `GetMethod` #26

Closed ExE-Boss closed 1 month ago

ExE-Boss commented 4 years ago

This changes the algorithm to use GetMethod instead of HasProperty and Get, which has the added benefit of treating null and undefined as absent.

It also makes it so that the insert and update properties are also always consistently [[Get]]ted at the start.

Depends on:

bmeck commented 4 years ago

Agree on using GetMethod, but need a consensus on eager vs lazy and to write it down somewhere per

https://github.com/tc39/proposal-upsert/issues/21#issuecomment-662480082

CC: @gibson042

dminor commented 1 month ago

Thank you for the contribution, but I'm closing this because we're moving in a different direction with the design.