gevalify
v0.1.0
Published
Turn an event on an EventEmitter into a geval event
Downloads
2
Maintainers
Readme
gevalify
Turn an event on an EventEmitter into a geval event. This allows easy exposure of read-only events and seamless interaction with API's who expect geval style events.
Installation
npm install gevalify
Usage
var Gevalify = require('gevalify');
var event = Gevalify(emitter, 'data');
// do stuff with event, probably expose publicly
var removeListener = event(handler);
API
Gevalify(emitter, eventName)
-> listener
Return a geval listener for the emitter's eventName event.
emitter
Required
Type: EventEmitter
The event emitter to use for the event.
eventName
Required
Type: string
The string name of the event to listen on.
Contributing
npm run test
License
MIT