1 2class EventBus { 3 constructor() { 4 this.events = {}; 5 } 6 7 register(event, callback) { 8 if (!this.events[event]) this.events[event] = []; 9 this.events[event].push(callback); 10 } 11 12 trigger(event, data = null) { 13 if (this.events[event]) { 14 this.events[event].forEach(callback => callback(data)); 15 } 16 } 17}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.