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