1 var isKeyable = require('./_isKeyable');
3 /** Used to stand-in for `undefined` hash values. */
4 var HASH_UNDEFINED = '__lodash_hash_undefined__';
7 * Adds `value` to the set cache.
12 * @param {*} value The value to cache.
14 function cachePush(value) {
15 var map = this.__data__;
16 if (isKeyable(value)) {
17 var data = map.__data__,
18 hash = typeof value == 'string' ? data.string : data.hash;
20 hash[value] = HASH_UNDEFINED;
23 map.set(value, HASH_UNDEFINED);
27 module.exports = cachePush;