1 var Map = require('./_Map'),
2 assocSet = require('./_assocSet'),
3 hashSet = require('./_hashSet'),
4 isKeyable = require('./_isKeyable');
7 * Sets the map `key` to `value`.
12 * @param {string} key The key of the value to set.
13 * @param {*} value The value to set.
14 * @returns {Object} Returns the map cache object.
16 function mapSet(key, value) {
17 var data = this.__data__;
19 hashSet(typeof key == 'string' ? data.string : data.hash, key, value);
21 data.map.set(key, value);
23 assocSet(data.map, key, value);
28 module.exports = mapSet;