1.2.0 • Published 3 years ago
map-implementations v1.2.0
Map Implementations
Modern polyfills of Stage 1 Collection Methods, including additional utility methods adapted from objects such as Array
to make Maps even more versatile.
If a method can be called on both keys and values, the method will target the Map's values by default and will have an implementation which targets the Map's keys (e.g., .find
and .findKey
).
Proposed Methods
Static
Instance
Map.prototype.deleteAll
Map.prototype.emplace
Map.prototype.every
Map.prototype.filter
Map.prototype.findKey
Map.prototype.find
Map.prototype.includes
Map.prototype.keyOf
Map.prototype.mapKeys
Map.prototype.mapValues
*Map.prototype.merge
Map.prototype.reduce
Map.prototype.some
* .mapValues
is called .map
for consistency
Custom Methods
Static
Map.isMap
Instance
Map.prototype.array
Map.prototype.at
*Map.prototype.keyArray
Map.prototype.filterOut
*Map.prototype.filterValues
Map.prototype.random
Map.prototype.randomKey
Map.prototype.uniqueBy
*
* Adapted to work with Collections