Initial commit

This commit is contained in:
Luis Fernando Molina committed 2018-09-03 15:19:57 +02:00
commit f47e08fdcb
2409 files changed
+363607

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
/**
* Converts `map` to its key-value pairs.
*
* @private
* @param {Object} map The map to convert.
* @returns {Array} Returns the key-value pairs.
*/
function mapToArray(map) {
var index = -1,
result = Array(map.size);
map.forEach(function(value, key) {
result[++index] = [key, value];
});
return result;
}
module.exports = mapToArray;