event-emitter-forward
v1.0.0
Published
function to forward EventEmitter events
Downloads
4
Readme
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