tc39 / proposal-upsert

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

WeakMap#upsert? #1

Closed zloirock closed 5 years ago

zloirock commented 5 years ago

Seems that also makes sense in the scope of this proposal.

bmeck commented 5 years ago

I think that is reasonable, it is ~= to the same as Map except the key check, so we can look to add it after the meeting this month. The semantics of the algorithm landing would make it a bit easier to ensure we don't have to discuss and track 2 algorithms yet.