Miss any of our Open RFC calls?Watch the recordings here! »

evproxy

0.0.1 • Public • Published

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);

Keywords

none

Install

npm i evproxy

DownloadsWeekly Downloads

3

Version

0.0.1

License

none

Last publish

Collaborators

  • avatar