EventEmitter3

A blazing-fast, drop-in EventEmitter for Node.js and browsers

Library
npm
v5.0.4
3,534stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
46/100Fair
Development Activity4
Maintenance20
Community60
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
78/100Good
Architecture75
Code Quality85
Innovation85
Learning Curve65

EventEmitter3 is a high-performance, standalone EventEmitter implementation designed to be a drop-in replacement for Node.js’s built-in events module. It strips away rarely-used features like domains, the newListener/removeListener meta-events, and setMaxListeners in favor of raw speed, while adding contextual this binding for listeners so consumers don’t need fn.bind.

Written in ECMAScript 3 for maximum compatibility, it runs unmodified in the oldest browsers and Node versions, making it a popular low-level dependency for real-time libraries, game engines, and UI frameworks such as PixiJS and Socket.IO/Primus.

What You Get

  • A Node.js-compatible EventEmitter API (on, once, emit, off, listeners, eventNames) usable in both Node and browsers
  • Contextual listener binding via a context argument, avoiding the overhead of Function.prototype.bind
  • An ES3-compatible implementation that runs in legacy browsers and old Node versions without polyfills
  • TypeScript type definitions (index.d.ts) plus both CommonJS (index.js) and native ESM (index.mjs) builds

Common Use Cases

  • Powering internal pub/sub in real-time transport libraries like Socket.IO and Primus
  • Driving event systems in rendering/game engines such as PixiJS
  • Providing lightweight state-change notifications inside UI component libraries
  • Replacing Node’s built-in EventEmitter in performance-sensitive server code

Under The Hood

Architecture — EventEmitter3 is a single ~330-line module (index.js) built around three small constructors: Events (a null-prototype map of event name to listener), EE (a wrapper holding a listener function, its bound context, and a once flag), and the public EventEmitter class that owns an Events instance. To sidestep prototype-pollution and shadowing of built-in Object.prototype members, event storage uses Object.create(null) where available, falling back to a ~ name-prefixing trick on engines without it (detected once at module load, not per-call). emit special-cases 0-6 argument counts with unrolled function calls before falling back to Function.prototype.apply for more, trading code size for call-path speed.

Tech Stack — Zero runtime dependencies; published as plain ECMAScript 3 so it works unmodified in ancient browsers and Node releases. The package.json exports map serves index.d.ts (types), index.mjs (ESM), and index.js (CJs) from a single source tree. Rollup + @rollup/plugin-terser produce a minified UMD bundle for the dist/ CDN build, generated only at prepublishOnly time (not committed to the repo).

Code Quality — Tests live in test/test.js (CJS, run via Mocha) and a parallel test/test.mjs (ESM entry point), using the assume assertion library; c8 collects V8-native coverage with both lcov and text reporters wired into npm test. The source carries consistent JSDoc annotations on every method (@param, @returns, @private), and naming is terse but consistent with the Node.js events module it mirrors, which keeps the diff between the two APIs easy to reason about.

API Design — The public surface deliberately mirrors Node’s built-in EventEmitter (on, once, emit, removeListener, removeAllListeners, listeners, eventNames, listenerCount) so it’s usable as a near drop-in replacement with no relearning cost. Its one notable extension — passing a context object as an extra argument to on/once/removeListener — removes the common need for fn.bind(this) at call sites, a small but genuinely ergonomic addition documented directly in the README with runnable examples.

Used by 11 apps in this directory

TypeScript
95%
Apache 2.0

AionUi

AI Agents · Productivity

32,102

Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.

View details
88
Repo Health
76
Technical
66
Dependency
Built with
TypeScript95%
Updated today
TypeScript
49%
MPL 2.0

Artillery

Devops · Developer Tools

9,054

Cloud-scale load testing and functional testing for APIs, WebSockets, gRPC, and headless browsers, distributed across AWS Lambda or Fargate with zero infrastructure to manage.

View details
89
Repo Health
73
Technical
68
Dependency
Built with
TypeScript49%
JavaScript48%
Updated 5 days ago
Rust
67%
MIT

Bun

Developer Tools

95,452

An all-in-one JavaScript and TypeScript toolkit — one Rust-and-JavaScriptCore binary that replaces Node.js, npm, a bundler, and a test runner with faster equivalents.

View details
92
Repo Health
91
Technical
66
Dependency
Built with
Rust67%
C++19%
Updated today
JavaScript
51%
MIT

Ghost

CMS · Blogging

54,795

Open source headless Node.js CMS for professional publishing, paid memberships, and newsletters with a fully owned audience.

View details
96
Repo Health
85
Technical
69
Dependency
Built with
JavaScript51%
TypeScript43%
Updated today
TypeScript
48%
AGPL 3.0

Grafana

Monitoring · Analytics

76,300

The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.

View details
95
Repo Health
91
Technical
65
Dependency
Built with
TypeScript48%
Go46%
Updated today
Clojure
73%
AGPL 3.0

Logseq

Note Taking · Knowledge Management

44,506

A privacy-first, open-source knowledge graph platform combining Markdown, Org-mode, bidirectional linking, and local-first storage for building your second brain.

View details
92
Repo Health
82
Technical
68
Dependency
Built with
Clojure73%
OCaml11%
Updated today
JavaScript
57%
Other

Lokus

Note Taking · Knowledge Management

774

Local-first note-taking with graph view, canvas & AI plugins—your Markdown files, zero telemetry, blazing-fast Rust performance.

View details
78
Repo Health
75
Technical
65
Dependency
Built with
JavaScript57%
HTML24%
Updated 1 weeks ago
TypeScript
53%
MIT

MentraOS

Developer Tools · AI Development

2,314

The open source operating system and SDK that lets developers build one app and run it across smart glasses from Even Realities, Vuzix, Mentra Live, and more.

View details
92
Repo Health
77
Technical
67
Dependency
Built with
TypeScript53%
Java19%
Updated today
Python
67%
Apache 2.0

Polar

Ecommerce · Developer Tools · Invoicing Finance

10,199

Open source payments infrastructure that turns software into a business — subscriptions, usage-based billing, digital products, and merchant-of-record compliance in one platform.

View details
90
Repo Health
82
Technical
71
Dependency
Built with
Python67%
TypeScript26%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search