Map methods

# Michał Wadas (a month ago)

With Set methods being discussed on next TC39 I would like to write second proposal - Map methods.

Currently I thought about:

Map.prototype.filter(cb, thisArg) Map.prototype.mapValues(cb, thisArg) Map.prototype.mapKeys(cb, thisArg) Map.prototype.merge(iterable: Iterable.<Tuple.<*, *>>)

Map.groupBy(iterable, keyDerivativeFunc) - analogus to lodash.groupBy lodash.com/docs/4.17.4#groupBy, but returning Map Instance.

Map.keyBy(iterable, keyDerivativeFunc) - analogous to lodash.keyBy, but returning Map instance.

I spend few minutes on writing code for simple polyfill - Ginden/map-methods/blob/master/polyfill.js and I'm gathering opinions what would be expected final shape of Map API.

Michał Wadas