gevalify

0.1.0 • Public • Published

gevalify Build Status Dependency Status devDependency Status

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

Package Sidebar

Install

npm i gevalify

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • chrisinajar