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

emit-function

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emit-function

because i get tired of typing EE.prototype.emit.bind.bind(EE.prototype.emit)

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22K
increased by58.26%
Maintainers
1
Weekly downloads
 
Created
Source

emit-function

because I hate having to import EventEmitter and call EventEmitter.prototype.emit.bind.bind(EventEmitter.prototype.emit).


var EE = require('events').EventEmitter
  , emit = require('emit-function')

var ee_1 = new EE
  , ee_2 = new EE

ee_1.on('data', emit(ee_2, 'data'))

api

emit(eventemitter, eventName[, curryArg1...curryArgN]) -> function

Creates a function that, when called, calls emit on eventemitter with eventName. Curried args are placed at the front, args added by calling the function are added after the curried args. Allows easy forwarding of events from emitter to emitter.

license

MIT

Keywords

FAQs

Package last updated on 02 Mar 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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