1 line
890 B
JavaScript
1 line
890 B
JavaScript
try{globalThis.Set=Set}catch(Set){!function(i,dPs){var proto=dPs(Set.prototype,{size:{configurable:!0,get:function(){return this._v.length}}});function Set(iterable){dPs(this,{_v:{value:[]}}),iterable&&iterable.forEach(this.add,this)}function has(self,value){return-1<(i=self._v.indexOf(value))}function pair(value){return[value,value]}proto.add=function(value){return has(this,value)||this._v.push(value),this},proto.clear=function(){var length=this._v.length;this._v.splice(0,length)},proto.delete=function(value){return has(this,value)&&!!this._v.splice(i,1)},proto.entries=function(){return this._v.map(pair)},proto.forEach=function(callback,context){this._v.forEach(function(value,i){callback.call(context,value,value,this)},this)},proto.has=function(key){return has(this,key)},proto.keys=proto.values=function(){return this._v.slice(0)},globalThis.Set=Set}(0,Object.defineProperties)} |