zemitter
Flexible Event Emitter for Node and the Browser
Install
$ npm install zemitter
Usage
var Emitter = var obj = {} //either make an object become an event emitter // returns obj //or create a brand new emittervar emitter =
Example
emitteremitteremitter emitter
API
on
emitter
emitter
emitter
off
emitter.off('start', fn)// remove fn as a listener to the 'start' event emitter.off('start') // remove all listeners to the start event emitter.off() // remove all listeners attached to this emitter
once
Attach a function that will only be called once, and then will be removed from the emitter
Tests
$ make
License
MIT