UNPKG

@elsikora/nestjs-crud-automator

Version:

A library for automating the creation of CRUD operations in NestJS.

22 lines (20 loc) 562 B
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; } } export { SubscriberWrapper }; //# sourceMappingURL=wrapper.class.js.map