es-toolkit
Version:
A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.
16 lines (12 loc) • 369 B
JavaScript
;
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
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;
}
exports.setToEntries = setToEntries;