summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/lodash/_addMapEntry.js
blob: 5a6921216013e777c9005505b85a81acb787f0d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * 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's not chainable in IE 11.
  map.set(pair[0], pair[1]);
  return map;
}

module.exports = addMapEntry;