var Eventual = require('../../lib/eventual'); var events = new Eventual(); var ctx = events.createContext(); ctx.on('hello:from:the',(e) => { e.wait(); console.log("Will be done in a sec"); setTimeout(() => { console.log("Continue"); e.done(); },1000); }); ctx.on('hello:from',(e) => { console.log("The other side"); e.stop(); }); ctx.on('hello',(e) => { console.log("Worked"); }); ctx.propagate('hello:from:the:other:side') .done(() => { console.log("Events called"); });