1.2.0 • Published 5 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.deleteAllMap.prototype.emplaceMap.prototype.everyMap.prototype.filterMap.prototype.findKeyMap.prototype.findMap.prototype.includesMap.prototype.keyOfMap.prototype.mapKeysMap.prototype.mapValues*Map.prototype.mergeMap.prototype.reduceMap.prototype.some
* .mapValues is called .map for consistency
Custom Methods
Static
Map.isMap
Instance
Map.prototype.arrayMap.prototype.at*Map.prototype.keyArrayMap.prototype.filterOut*Map.prototype.filterValuesMap.prototype.randomMap.prototype.randomKeyMap.prototype.uniqueBy*
* Adapted to work with Collections