Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/segment-boneyard/proxy-events
Use https://github.com/segmentio/forward-events instead.
https://github.com/segment-boneyard/proxy-events
Last synced: about 5 hours ago
JSON representation
Use https://github.com/segmentio/forward-events instead.
- Host: GitHub
- URL: https://github.com/segment-boneyard/proxy-events
- Owner: segment-boneyard
- Created: 2013-12-11T05:02:51.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-03T18:48:01.000Z (almost 11 years ago)
- Last Synced: 2024-11-12T22:10:26.694Z (3 days ago)
- Language: JavaScript
- Homepage:
- Size: 152 KB
- Stars: 10
- Watchers: 39
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# proxy-events
Proxy events from one emitter to another.
[![Build Status](https://travis-ci.org/segmentio/proxy-events.png?branch=master)](https://travis-ci.org/segmentio/proxy-events)
## Installation
```
$ npm install proxy-events
$ component install segmentio/proxy-events
```## Example
```js
var Emitter = require('events').EventEmitter;
var proxy = require('proxy-events');var app = new Emitter;
var subapp = new Emitter;proxy(subapp, app);
app.on('foo', console.log);
subapp.emit('foo', 'bar');
// "bar"
```## API
### proxy(one, another, [prefix])
Proxy events from `one` emitter to `another` with an optional `prefix`.
# License
MIT