UNPKG

es-toolkit

Version:

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

13 lines (12 loc) 300 B
//#region src/compat/_internal/setToEntries.ts function setToEntries(set) { const arr = new Array(set.size); const values = set.values(); for (let i = 0; i < arr.length; i++) { const value = values.next().value; arr[i] = [value, value]; } return arr; } //#endregion export { setToEntries };