You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
846 B
30 lines
846 B
2 years ago
|
export var FastMap = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||
|
function FastMap() {
|
||
|
this.values = {};
|
||
|
}
|
||
|
FastMap.prototype.delete = function (key) {
|
||
|
this.values[key] = null;
|
||
|
return true;
|
||
|
};
|
||
|
FastMap.prototype.set = function (key, value) {
|
||
|
this.values[key] = value;
|
||
|
return this;
|
||
|
};
|
||
|
FastMap.prototype.get = function (key) {
|
||
|
return this.values[key];
|
||
|
};
|
||
|
FastMap.prototype.forEach = function (cb, thisArg) {
|
||
|
var values = this.values;
|
||
|
for (var key in values) {
|
||
|
if (values.hasOwnProperty(key) && values[key] !== null) {
|
||
|
cb.call(thisArg, values[key], key);
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
FastMap.prototype.clear = function () {
|
||
|
this.values = {};
|
||
|
};
|
||
|
return FastMap;
|
||
|
}());
|
||
|
//# sourceMappingURL=FastMap.js.map
|