Map over a
Set
Because Set
is missing a Set#map
method.
$ npm install set-map
import setMap from 'set-map';
const set = new Set(['foo', 'bar']);
setMap(set, value => `yo${value}`).values();
//=> ['yofoo', 'yobar']
Type: Set
The Set
to map over.
Type: function
Called for every element and should return the new element.