mirror of
				https://github.com/fooflington/selfdefined.git
				synced 2025-11-04 07:39:03 +00:00 
			
		
		
		
	update
This commit is contained in:
		
							
								
								
									
										45
									
								
								node_modules/rxjs/_esm5/util/MapPolyfill.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								node_modules/rxjs/_esm5/util/MapPolyfill.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
export var MapPolyfill = /*@__PURE__*/ (/*@__PURE__*/ function () {
 | 
			
		||||
    function MapPolyfill() {
 | 
			
		||||
        this.size = 0;
 | 
			
		||||
        this._values = [];
 | 
			
		||||
        this._keys = [];
 | 
			
		||||
    }
 | 
			
		||||
    MapPolyfill.prototype.get = function (key) {
 | 
			
		||||
        var i = this._keys.indexOf(key);
 | 
			
		||||
        return i === -1 ? undefined : this._values[i];
 | 
			
		||||
    };
 | 
			
		||||
    MapPolyfill.prototype.set = function (key, value) {
 | 
			
		||||
        var i = this._keys.indexOf(key);
 | 
			
		||||
        if (i === -1) {
 | 
			
		||||
            this._keys.push(key);
 | 
			
		||||
            this._values.push(value);
 | 
			
		||||
            this.size++;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            this._values[i] = value;
 | 
			
		||||
        }
 | 
			
		||||
        return this;
 | 
			
		||||
    };
 | 
			
		||||
    MapPolyfill.prototype.delete = function (key) {
 | 
			
		||||
        var i = this._keys.indexOf(key);
 | 
			
		||||
        if (i === -1) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        this._values.splice(i, 1);
 | 
			
		||||
        this._keys.splice(i, 1);
 | 
			
		||||
        this.size--;
 | 
			
		||||
        return true;
 | 
			
		||||
    };
 | 
			
		||||
    MapPolyfill.prototype.clear = function () {
 | 
			
		||||
        this._keys.length = 0;
 | 
			
		||||
        this._values.length = 0;
 | 
			
		||||
        this.size = 0;
 | 
			
		||||
    };
 | 
			
		||||
    MapPolyfill.prototype.forEach = function (cb, thisArg) {
 | 
			
		||||
        for (var i = 0; i < this.size; i++) {
 | 
			
		||||
            cb.call(thisArg, this._values[i], this._keys[i]);
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
    return MapPolyfill;
 | 
			
		||||
}());
 | 
			
		||||
//# sourceMappingURL=MapPolyfill.js.map
 | 
			
		||||
		Reference in New Issue
	
	Block a user