%PDF- %PDF-
Direktori : /home/tradesc/www/relax/wp-content/plugins/wp-meteor/src/js/public/includes/utils/ |
Current File : /home/tradesc/www/relax/wp-content/plugins/wp-meteor/src/js/public/includes/utils/event-emitter.js |
export default class EventEmitter { constructor() { this.l = []; } emit(name, data = null) { this.l[name] && this.l[name].forEach((l) => l(data)); } on(name, callback) { this.l[name] ||= []; this.l[name].push(callback); } off(name, callback) { this.l[name] = (this.l[name] || []).filter((c) => c !== callback); } } //# sourceMappingURL=event-emitter.js.map