ECMAScript proposal for Map.prototype.getOrInsert, Map.prototype.getOrInsertComputed, WeakMap.prototype.getOrInsert, and WeakMap.prototype.getOrInsertComputed.
Firefox: Shipped/Shipping — Firefox now supports the upsert proposal. This adds getOrInsert and getOrInsertComputed methods to Map and WeakMap. These methods either return the value associated with a key, or insert a default value, and then return that value, simplifying handling of cases where it's not known if a key is already present in the Map or WeakMap.
Safari: Shipped/Shipping — Added support for Map.prototype.getOrInsert and WeakMap.prototype.getOrInsert. (138955824)