@hms-networks/kolibri-js-client
Version:
Kolibri Consumer API client for building kolibri based applications
44 lines • 1.56 kB
JavaScript
/*
* Copyright 2021 HMS Industrial Networks AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http: //www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var Subscription = /** @class */ (function () {
function Subscription() {
this._subscribedNodes = new Map();
}
Object.defineProperty(Subscription.prototype, "subscribedNodes", {
get: function () { return this._subscribedNodes; },
enumerable: false,
configurable: true
});
;
Subscription.prototype.storeSubscribedNodes = function (nodes) {
var _this = this;
nodes.forEach(function (node) {
_this.subscribedNodes.set(node.path, node);
});
};
Subscription.prototype.deleteSubscribedNodes = function (nodes) {
var _this = this;
nodes.forEach(function (node) {
_this.subscribedNodes.delete(node.path);
});
};
Subscription.prototype.fetchSubscribedNode = function (path) {
return this.subscribedNodes.get(path);
};
return Subscription;
}());
export { Subscription };
//# sourceMappingURL=subscription.js.map