Sha256: ef72b05f27b810feb101850db8bb6c7215996b2396a807f78d67d9ed8656af8c
Contents?: true
Size: 624 Bytes
Versions: 26
Compression:
Stored size: 624 Bytes
Contents
var MapCache = require('./_MapCache'), setCacheAdd = require('./_setCacheAdd'), setCacheHas = require('./_setCacheHas'); /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values ? values.length : 0; this.__data__ = new MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; module.exports = SetCache;
Version data entries
26 entries across 5 versions & 3 rubygems