Cancel the subscription. This stops your callback from being triggered when this topic is published.
const mysub = eventbus.subscribe('sitapati.highscore', (score) => { if (score === "-1") { return mysub.cancel(); // Stop listening to this topic. } magik.dixit(`High score is ${score`); });
Subscription
Generated using TypeDoc
Cancel the subscription. This stops your callback from being triggered when this topic is published.
const mysub = eventbus.subscribe('sitapati.highscore', (score) => { if (score === "-1") { return mysub.cancel(); // Stop listening to this topic. } magik.dixit(`High score is ${score`); });
Subscription