Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including evproxy with all npm packages installed. Try it out:

var evproxy = require("evproxy")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

evproxy v0.0.1

Proxy events between `EventEmitter`s

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

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free