UNPKG

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) 381 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); function mapToEntries(map) { const arr = new Array(map.size); const keys = map.keys(); const values = map.values(); for (let i = 0; i < arr.length; i++) { arr[i] = [keys.next().value, values.next().value]; } return arr; } exports.mapToEntries = mapToEntries;