Events

Add listener:

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

Multi-listener:

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

Emit event:

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

Multi-emit event:

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

Remove listener:

sb.remove('hi')

results matching ""

    No results matching ""