const data = { myEvent: () => { } } // implementation data.myEvent = stream => { console.log(stream, 'output'); }