UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

15 lines (11 loc) 317 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); function map(set, getNewValue) { const result = new Set(); for (const value of set) { const newValue = getNewValue(value, value, set); result.add(newValue); } return result; } exports.map = map;