MCPcopy Create free account
hub / github.com/RubyLouvre/anu / mapToArray

Function mapToArray

test/babel.js:28605–28613  ·  view source on GitHub ↗

* Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. * @returns {Array} Returns the key-value pairs.

(map)

Source from the content-addressed store, hash-verified

28603 * @returns {Array} Returns the key-value pairs.
28604 */
28605 function mapToArray(map) {
28606 var index = -1,
28607 result = Array(map.size);
28608
28609 map.forEach(function (value, key) {
28610 result[++index] = [key, value];
28611 });
28612 return result;
28613 }
28614
28615 module.exports = mapToArray;
28616

Callers 1

cloneMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected