%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/tradesc/www/relax/wp-content/plugins/wp-meteor/src/js/public/includes/utils/
Upload File :
Create Path :
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

Zerion Mini Shell 1.0