Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
vendor
/
livewire
/
livewire
/
js
:
MessageBus.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
export default class MessageBus { constructor() { this.listeners = {} } register(name, callback) { if (! this.listeners[name]) { this.listeners[name] = [] } this.listeners[name].push(callback) } call(name, ...params) { (this.listeners[name] || []).forEach(callback => { callback(...params) }) } has(name) { return Object.keys(this.listeners).includes(name) } }