Modularize master branch.

This commit is contained in:
John-David Dalton
2016-12-30 22:26:46 -06:00
parent 912d6b04a1
commit 2900cfd288
745 changed files with 19699 additions and 140151 deletions

18
_mapToArray.js Normal file
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;
}
export default mapToArray;