mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Bump to v4.12.0.
This commit is contained in:
10
_SetCache.js
10
_SetCache.js
@@ -1,9 +1,10 @@
|
||||
var MapCache = require('./_MapCache'),
|
||||
cachePush = require('./_cachePush');
|
||||
setCacheAdd = require('./_setCacheAdd'),
|
||||
setCacheHas = require('./_setCacheHas');
|
||||
|
||||
/**
|
||||
*
|
||||
* Creates a set cache object to store unique values.
|
||||
* Creates an array cache object to store unique values.
|
||||
*
|
||||
* @private
|
||||
* @constructor
|
||||
@@ -15,11 +16,12 @@ function SetCache(values) {
|
||||
|
||||
this.__data__ = new MapCache;
|
||||
while (++index < length) {
|
||||
this.push(values[index]);
|
||||
this.add(values[index]);
|
||||
}
|
||||
}
|
||||
|
||||
// Add methods to `SetCache`.
|
||||
SetCache.prototype.push = cachePush;
|
||||
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
||||
SetCache.prototype.has = setCacheHas;
|
||||
|
||||
module.exports = SetCache;
|
||||
|
||||
Reference in New Issue
Block a user