Tumortisch-Dist/resources/app/node_modules/rxjs/util/FastMap.js

31 lines
851 B
JavaScript
Raw Normal View History

2021-06-15 16:00:08 +02:00
"use strict";
var FastMap = (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;
}());
exports.FastMap = FastMap;
//# sourceMappingURL=FastMap.js.map