Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eventyoshi

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eventyoshi - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

.gitignore

18

lib/index.js

@@ -179,2 +179,4 @@ var EventEmitter = require('events').EventEmitter

if ((ev = this.__events[event]) !== undefined) {
var found = false;
for (var i = 0, l = ev.listeners.length; i < l; i++) {

@@ -184,2 +186,3 @@ var l = ev.listeners[i];

(typeof l.listener === 'function' && l.listener === listener)) {
found = true;
break;

@@ -189,2 +192,4 @@ }

if (!found) return;
this.children.forEach(function(ee) {

@@ -252,1 +257,14 @@ ee.removeListener(event, ev.wrappers[i]);

};
//
// Proxy custom functions
//
yoshi.prototype.proxy = function(fn) {
this[fn] = function() {
var args = arguments;
this.children.forEach(function(ee) {
ee[fn].apply(ee, args);
});
};
};

2

package.json

@@ -5,3 +5,3 @@ {

"keywords": ["event", "emitter", "eventemitter", "router", "proxy"],
"version": "0.1.0",
"version": "0.1.1",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -5,3 +5,3 @@ # eventyoshi [![Build Status](https://secure.travis-ci.org/fent/node-eventyoshi.png)](http://travis-ci.org/fent/node-eventyoshi)

![concept](https://github.com/fent/node-eventyoshi/raw/master/yoshi.png)
![concept](https://github.com/fent/node-eventyoshi/raw/master/img/yoshi.png)

@@ -70,3 +70,13 @@ # Usage

### yoshi.proxy(fn)
Proxies all calls from to `yoshi[fn]` to its children.
```js
yoshi.add(writeStream);
yoshi.proxy('write');
yoshi.write(data); // this will call writeStream.write with data
```
## Events

@@ -73,0 +83,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc