artdaq_node_server  v1_00_08
 All Classes Namespaces Files Variables Pages
_SetCache.js
1 var MapCache = require('./_MapCache'),
2  setCacheAdd = require('./_setCacheAdd'),
3  setCacheHas = require('./_setCacheHas');
4 
13 function SetCache(values) {
14  var index = -1,
15  length = values == null ? 0 : values.length;
16 
17  this.__data__ = new MapCache;
18  while (++index < length) {
19  this.add(values[index]);
20  }
21 }
22 
23 // Add methods to `SetCache`.
24 SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
25 SetCache.prototype.has = setCacheHas;
26 
27 module.exports = SetCache;