source:
node_modules/es-toolkit/dist/set/map.mjs@
a762898
| Last change on this file since a762898 was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 225 bytes | |
| Line | |
|---|---|
| 1 | function map(set, getNewValue) { |
| 2 | const result = new Set(); |
| 3 | for (const value of set) { |
| 4 | const newValue = getNewValue(value, value, set); |
| 5 | result.add(newValue); |
| 6 | } |
| 7 | return result; |
| 8 | } |
| 9 | |
| 10 | export { map }; |
Note:
See TracBrowser
for help on using the repository browser.
