code: function Set(capacity) {
    if (capacity != null &&
        (!isFinite(capacity) || Math.floor(capacity) !== capacity || capacity < 1)) {
      throw new Error('Set: invalid capacity');
    }
    this._capacity = this._capacity || defaultCapacity;
  
    this._buckets = [];
    for (var i = 0; i < this._capacity; i++) {
      this._buckets.push([]);
    }
    this._size = 0;
  }
docs: A set data structure for elements implementing hash() and equals(). The capacity, if given, is just a hint; the set is allowed to exceed it, but performance may suffer.