d4884336ba275f64f2ea623f7414891df65c1946
[yaffs-website] / node_modules / uncss / node_modules / lodash / internal / SetCache.js
1 var MapCache = require('./MapCache'),
2     cachePush = require('./cachePush');
3
4 /**
5  *
6  * Creates a set cache object to store unique values.
7  *
8  * @private
9  * @param {Array} [values] The values to cache.
10  */
11 function SetCache(values) {
12   var index = -1,
13       length = values ? values.length : 0;
14
15   this.__data__ = new MapCache;
16   while (++index < length) {
17     this.push(values[index]);
18   }
19 }
20
21 // Add functions to the `SetCache`.
22 SetCache.prototype.push = cachePush;
23
24 module.exports = SetCache;