import{addUniqueItem as t,removeItem as i}from"./array.js";var s=function(){function s(){this.subscriptions=[]}return s.prototype.add=function(s){var r=this;return t(this.subscriptions,s),function(){return i(r.subscriptions,s)}},s.prototype.notify=function(t,i,s){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,i,s);else for(var n=0;n<r;n++){var o=this.subscriptions[n];o&&o(t,i,s)}},s.prototype.getSize=function(){return this.subscriptions.length},s.prototype.clear=function(){this.subscriptions.length=0},s}();export{s as SubscriptionManager};
//# sourceMappingURL=subscription-manager.js.map
