proxy-events

Proxy events from one emitter to another.

npm install proxy-events
6 downloads in the last day
47 downloads in the last week
229 downloads in the last month

proxy-events

Proxy events from one emitter to another.

Installation

$ npm install proxy-events
$ component install segmentio/proxy-events

Example

var Emitter = require('events').EventEmitter;
var events = require('proxy-events');

var app = new Emitter;
var subapp = new Emitter;

events(subapp, app);

app.on('foo', console.log);

subapp.emit('foo', 'bar'); 
// "bar"

API

proxy(one, another, [prefix])

Proxy events from one emitter to another with an optional prefix.

License

MIT

npm loves you