Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 10, 2024 via pnpm

eventemitter3 5.0.1

EventEmitter3 focuses on performance while maintaining a Node.js AND browser compatible interface.
Package summary
Share
0
issues
1
license
1
MIT
Package created
25 Sep 2013
Version published
30 Apr 2023
Maintainers
3
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
eventemitter3@5.0.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of eventemitter3 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does eventemitter3 do?

EventEmitter3 is a high-performance EventEmitter for both Node.js and browser environments. As the name suggests, it provides an event-driven architecture where certain kind of events can trigger certain actions. It's designed with an emphasis on performance and operational speed, while also maintaining compatibility with the Node.js and browser interfaces. Some key differences that set EventEmitter3 apart include the removal of domain support and the absence of throwing an error when emitting an 'error' event, if no one is listening.

How do you use eventemitter3?

To use EventEmitter3, the first step is to install the package through npm using the command npm install --save eventemitter3. After installing the package successfully, you can start using it by requiring the module in your JavaScript code as follows:

var EventEmitter = require('eventemitter3');

After this, you can create your own EventEmitter instances and start using the module in your application. Here's an example on how you can utilize the EventEmitter object, once initialized:

var EE = new EventEmitter()
  , context = { foo: 'bar' };

function emitted() {
  console.log(this === context); // true
}

EE.once('event-name', emitted, context);
EE.on('another-event', emitted, context);
EE.removeListener('another-event', emitted, context);

The above code creates a new EventEmitter instance and sets up an event listener that triggers when an event called 'event-name' is emitted. A contextual 'this' value is set for the emitted events which can modify the context of functions, negating the need for using fn.bind.

Where are the eventemitter3 docs?

For extensive documentation and API details of EventEmitter3, it is recommended to follow the official Node.js documentation at http://nodejs.org/api/events.html. The GitHub repository for EventEmitter3, found at git://github.com/primus/eventemitter3.git, can also be a valuable resource for additional information and clarification.