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

node-event-emitter

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-event-emitter

Direct port of node's EventEmitter with no dependencies. Available for CommonJS and browser environments.

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3.1K
decreased by-15.97%
Maintainers
1
Weekly downloads
 
Created
Source

node-event-emitter

Direct port of node's EventEmitter with no dependencies. Available for CommonJS and browser environments.

This module was taken from node's source and altered to remove the logic regarding domains and all dependencies. This way it is dependency free, lighter weight and still has the exact same API (minus the domain stuff), making it ideal for those wishing to share code on client and server that depend on EventEmitter.

Documentation

Why

I needed an event system for my client side code and since I'm using node on the backend I wanted to make sure I'm not using two modules and two APIs for the same functionality. In addition, the code in question is being shared on both the client and server so I wanted to make use of EventEmitter on the server and browserify it for the client. The problem is, node's EventEmitter has two dependencies, which each have their own dependencies and an abundance of functionality which I do not need. I wanted something that removed the dependencies and any other code that was specific to node's environment while keeping the same interface and functionality.

I looked for other modules out there that aimed to solve this problem but everything I found was less than ideal. The libraries I came across added additional functionality or changed the API in some way. These libraries were also more lines of code. Given that I'm using the same code on client and server, I cannot have the same module implement two different interfaces depending on the environment. Hence this library.

Obtainage

npm install node-event-emitter

Or if you're interested in using it just in browser environments, you can grab either the minified or non minified vesions in the root of this repo.

LICENSE

MIT

Keywords

FAQs

Package last updated on 29 Mar 2014

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