mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 09:22:22 +00:00
16 lines
375 B
JavaScript
16 lines
375 B
JavaScript
class CalendarDates{
|
|
|
|
static subscribers_array = [];
|
|
|
|
static subscribe(subscriber){
|
|
this.subscribers_array.push(subscriber);
|
|
}
|
|
static unsubscribe(subscriber){
|
|
this.subscribers_array = this.subscribers_array.filter(sub => !sub.compare(subscriber));
|
|
}
|
|
static cleanup(){
|
|
this.subscribers_array.forEach(sub => { sub.cleanup() });
|
|
}
|
|
}
|
|
|
|
export default CalendarDates; |