1 var MapCache = require('./_MapCache'),
2 assocSet = require('./_assocSet');
4 /** Used as the size to enable large array optimizations. */
5 var LARGE_ARRAY_SIZE = 200;
8 * Sets the stack `key` to `value`.
13 * @param {string} key The key of the value to set.
14 * @param {*} value The value to set.
15 * @returns {Object} Returns the stack cache object.
17 function stackSet(key, value) {
18 var data = this.__data__,
22 if (array.length < (LARGE_ARRAY_SIZE - 1)) {
23 assocSet(array, key, value);
26 data.map = new MapCache(array);
36 module.exports = stackSet;