1.0.0 • Published 9 years ago

event-emitter-forward v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

event-emitter-forward

Forward events from one EventEmitter to another.

var forward = require("event-emitter-forward"),
    EventEmitter = require("events").EventEmitter,
    source = new EventEmitter(),
    target = new EventEmitter();

forward("foo", source, target);
target.on("foo", console.log.bind(console));
source.emit("foo", "foofing");

// expected output:
// foofing