Description
EventEmitter3 is a high-performance EventEmitter for Node.js and browsers. It is micro-optimized for common code paths, and its README says it is one of the fastest EventEmitter implementations available. It is API compatible with the EventEmitter that ships with Node.js, so it can be a drop-in replacement in existing code. The README lists the differences. Domain support is removed, emitting an error with no listener does not throw, and the newListener and removeListener events are gone. The setMaxListeners, getMaxListeners, prependListener and prependOnceListener methods are not available. Instead, listeners can take a custom context, so you do not need fn.bind. removeListener removes all matching listeners, not just the first. The library is written in ECMAScript 3, so it runs in the oldest browsers and Node.js versions. It can be installed from npm or loaded from a CDN. Tests and benchmarks are in the GitHub repository and not in the npm package. The project is released under the MIT License.…
Highlights
- Fast drop-in EventEmitter for Node.js and browsers
- Custom context for listeners, no fn.bind
- Written in ECMAScript 3 for old runtimes
- Tests and benchmarks in the repository
- MIT license
Ratings & Reviews
No ratings yet
Be the first to rate Eventemitter3.
People also visit
Eventemitter3 FAQ
What is EventEmitter3?
A fast EventEmitter library for Node.js and browsers that works as a replacement for the built-in one.
Is it a drop-in replacement?
Mostly. The README says it is API compatible with Node's EventEmitter, with some differences such as no domain support and no prependListener.
How do I install it?
The README gives installation steps and a recommended CDN.
Does it work in old browsers?
Yes. The README says it is written in ECMAScript 3, so it works in the oldest browsers and Node.js versions you need to support.
Is it free?
Yes. It is released under the MIT License.
Where are the benchmarks?
In the GitHub repository. The benchmark and test files are not in the npm package.
What are the best Eventemitter3 alternatives?
Popular alternatives to Eventemitter3 include Evt, Canvas Confetti and JS Libp2p. See all Eventemitter3 alternatives





