1 var MapCache = require('./_MapCache'),
2 setCacheAdd = require('./_setCacheAdd'),
3 setCacheHas = require('./_setCacheHas');
7 * Creates an array cache object to store unique values.
11 * @param {Array} [values] The values to cache.
13 function SetCache(values) {
15 length = values == null ? 0 : values.length;
17 this.__data__ = new MapCache;
18 while (++index < length) {
19 this.add(values[index]);
23 // Add methods to `SetCache`.
24 SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
25 SetCache.prototype.has = setCacheHas;
27 module.exports = SetCache;