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

/evproxy/

    Package Sidebar

    Install

    npm i evproxy

    Weekly Downloads

    0

    Version

    0.0.1

    License

    none

    Last publish

    Collaborators

    • mmalecki