Fixing typescript

This commit is contained in:
Drew Heavner
2019-11-08 09:40:34 -05:00
parent 413298b06f
commit 3b9b1768ea
7365 changed files with 1663644 additions and 16 deletions
+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;