<div dir="ltr"><div><div><div><div><div><div><div><div><div>Hi.<br><br></div>With Set methods being discussed on next TC39 I would like to write second proposal - Map methods.<br><br></div>Currently I thought about:<br><br></div><span style="font-family:monospace,monospace">Map.prototype.filter(cb, thisArg)<br></span></div><span style="font-family:monospace,monospace">Map.prototype.mapValues(cb, thisArg)<br></span></div><span style="font-family:monospace,monospace">Map.prototype.mapKeys(cb, thisArg)</span></div><div><span style="font-family:monospace,monospace">Map.prototype.merge(iterable: Iterable.<Tuple.<*, *>>)</span><br><br></div><span style="font-family:monospace,monospace">Map.groupBy(iterable, keyDerivativeFunc)</span> - analogus to <a href="https://lodash.com/docs/4.17.4#groupBy">lodash.groupBy</a>, but returning Map Instance.<br></div><span style="font-family:monospace,monospace">Map.keyBy(iterable, keyDerivativeFunc)</span> - analogous to lodash.keyBy, but returning Map instance.<br><br></div>I spend few minutes on writing code for simple polyfill - <a href="https://github.com/Ginden/map-methods/blob/master/polyfill.js">https://github.com/Ginden/map-methods/blob/master/polyfill.js</a> and I'm gathering opinions what would be expected final shape of Map API.</div><div><br></div>MichaƂ Wadas<br></div>