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

re-emitter

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

re-emitter - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

reemit.js

21

index.js
var slice = Array.prototype.slice
, EventEmitter = require("events").EventEmitter
, reemit = require("./reemit")

@@ -15,21 +16,1 @@ ReEmitter.reemit = reemit

}
function reemit(source, target, events) {
events.forEach(proxyEvent, {
source: source
, target: target
})
}
function proxyEvent(eventName) {
var source = this.source
, target = this.target
source.on(eventName, propagate)
function propagate() {
var args = [].slice.call(arguments)
args.unshift(eventName)
target.emit.apply(target, args)
}
}
{
"name": "re-emitter",
"version": "0.2.0",
"version": "0.3.0",
"description": "Re emit events from another emitter",

@@ -19,3 +19,5 @@ "keywords": [],

},
"dependencies": {},
"dependencies": {
"to-array": "~0.1.3"
},
"devDependencies": {},

@@ -22,0 +24,0 @@ "licenses": [

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