s
s
spellbook
Search…
Events

sb.on('bye', name => {
console.log(`Bye ${name} !`)
})

sb.on(['hi', 'hello'], name => {
console.log(`Hi ${name}!`)
})

sb.emit('hi', 'master')

sb.emit(['hi', 'bye'], 'master')

sb.remove('hi')
Copy link
On this page
Add listener:
Multi-listener:
Emit event:
Multi-emit event:
Remove listener: