This package provides implementations of Map.prototype.emplace
and WeakMap.prototype.emplace
which have been proposed in https://github.com/tc39/proposal-upsert.
Functions
emplaceMap
: Inserts a new value or updates an existing value from aMap
.emplaceWeakMap
: Inserts a new value or updates an existing value from aWeakMap
.