evproxy

Proxy events between `EventEmitter`s

npm install evproxy
2 downloads in the last week
4 downloads in the last month

evproxy Build Status

Proxy events between EventEmitters.

Installation

npm install evproxy

Usage

var EventEmitter = require('events').EventEmitter,
    evproxy = require('evproxy');

var dest = new EventEmitter(),
    source = new EventEmitter();

evproxy({ source: source, destination: dest });

dest.on('event', function (arg) {
  console.log('got event', arg);
});

dest.on('next event', function (arg0, arg1) {
  console.log('got next event', arg0, arg1);
});

source.emit('event', 42);
source.emit('next event', 1, -1);
npm loves you