Files
lodash/_addMapEntry.js
John-David Dalton ddf9328c67 Bump to v4.6.0.
2016-03-01 19:18:30 -08:00

16 lines
381 B
JavaScript

/**
* Adds the key-value `pair` to `map`.
*
* @private
* @param {Object} map The map to modify.
* @param {Array} pair The key-value pair to add.
* @returns {Object} Returns `map`.
*/
function addMapEntry(map, pair) {
// Don't return `Map#set` because it doesn't return the map instance in IE 11.
map.set(pair[0], pair[1]);
return map;
}
module.exports = addMapEntry;