Events

Add listener:

sb.on('bye', function (name) {
        console.log("Bye  " + name + "!");
});

Multi-listener:

sb.on(['hi', 'hello'], function (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 ""