@elsikora/nestjs-crud-automator
Version:
A library for automating the creation of CRUD operations in NestJS.
24 lines (21 loc) • 594 B
JavaScript
;
class SubscriberWrapper {
name;
subscribers;
constructor(name, subscribers = []) {
this.name = name;
this.subscribers = subscribers;
}
addSubscriber(subscriber, priority = 0, properties) {
this.subscribers.push({ priority, properties, subscriber });
this.subscribers.sort((a, b) => b.priority - a.priority);
}
getName() {
return this.name;
}
getSubscriberCount() {
return this.subscribers.length;
}
}
exports.SubscriberWrapper = SubscriberWrapper;
//# sourceMappingURL=wrapper.class.js.map