source: imaps-frontend/node_modules/lodash/_mapToArray.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 363 bytes
RevLine 
[79a0317]1/**
2 * Converts `map` to its key-value pairs.
3 *
4 * @private
5 * @param {Object} map The map to convert.
6 * @returns {Array} Returns the key-value pairs.
7 */
8function mapToArray(map) {
9 var index = -1,
10 result = Array(map.size);
11
12 map.forEach(function(value, key) {
13 result[++index] = [key, value];
14 });
15 return result;
16}
17
18module.exports = mapToArray;
Note: See TracBrowser for help on using the repository browser.