events
A standalone, browser-compatible port of Node.js's built-in EventEmitter
Repository Health
Technical Analysis
events is a from-scratch reimplementation of Node.js’s core events module, ported to ES5 so it can run in environments — chiefly web browsers — that don’t ship Node’s built-in EventEmitter. It deliberately tracks the Node.js API as closely as possible (contributions are expected to be copy-pasted and transpiled from Node.js source rather than reimplemented independently), so code written against Node’s EventEmitter behaves identically when bundled for the browser.
Most developers never install it directly: bundlers like Browserify and Webpack automatically substitute this package whenever bundled code does require('events'), which is why it accumulates tens of millions of weekly downloads despite being a small, rarely-updated utility. Originally authored by Irakli Gozalishvili (Gozala/events), the repository now lives under the browserify GitHub organization, which Gozala’s original repo redirects to.
What You Get
- An
EventEmitterclass with the full Node.jseventsAPI surface (on,once,off,emit,removeListener,removeAllListeners, etc.) prependListener/prependOnceListenersupport matching Node’s ordering semantics- Max-listener leak warnings identical to Node’s built-in behavior
- Special handling of the
'error'event (throws if unhandled, matching Node.js) - Zero runtime dependencies and ES5-only syntax for broad browser compatibility
Common Use Cases
- Automatic substitution by Browserify/Webpack whenever bundled code calls
require('events')in a browser build - Using the familiar Node.js EventEmitter API in isomorphic (universal) JavaScript code that runs in both Node and the browser
- Porting a Node.js library that depends on
eventsto run client-side without rewriting its event-handling logic - Lightweight pub/sub within a browser application without pulling in a heavier event-bus library
Under The Hood
Architecture The entire implementation lives in a single 497-line events.js file exporting one EventEmitter constructor with prototype methods (on, once, off, emit, listenerCount, prependListener, etc.) — there is no module decomposition because the surface area intentionally mirrors Node.js’s own single-file events core module line-for-line. Tech Stack Pure ES5 with zero runtime dependencies; the project explicitly avoids modern syntax to maximize compatibility with older browsers and bundlers, and its own README recommends pairing it with es5-shim for very old targets like IE8. Code Quality The tests/ directory is unusually granular for its size — separate files for max-listeners.js, listener-count.js, prepend.js, remove-listeners.js, special-event-names.js, and subclass.js, each targeting one specific behavior, mirroring Node.js’s own upstream test suite so behavioral drift from Node is caught immediately. API Design By design there is no independent API — the project’s contribution guidelines require new code to be copy-pasted and transpiled from Node.js’s own lib/events.js rather than reimplemented, so its ergonomics are exactly Node’s: familiar to any Node developer, with the tradeoff that browser-specific ergonomics were never a design goal.
Used by 17 apps in this directory
GraphQL Hive
Developer Tools · Devops · Monitoring
Open-source GraphQL schema registry and observability platform with breaking change detection, federation support, and CI/CD integration for teams of any size.
Hoppscotch
Developer Tools
A lightweight, offline-capable API development ecosystem for testing HTTP, GraphQL, WebSocket, MQTT, and SSE endpoints across web, desktop, and CLI.
Huly Platform
Collaboration · Project Management · Team Chat
Open-source all-in-one workspace that replaces Linear, Jira, Slack, and Notion for product and engineering teams.
Joplin
Note Taking
The privacy-first, open-source note-taking app with end-to-end encrypted sync, AI assistance, and a powerful plugin ecosystem across every platform.
MentraOS
AI Development · Developer Tools
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.
Metabase
Analytics
The open-source BI platform that lets anyone ask questions and build dashboards without writing SQL — with an embedded analytics SDK and AI-powered query assistant included.
overleaf
Collaboration · Productivity
Open-source, real-time collaborative LaTeX editor with sandboxed compilation and full TeXLive support for self-hosted academic and research teams.
Teleport
Authentication · Security
Zero-trust infrastructure access platform that replaces credentials and VPNs with short-lived certificates, SSO, and identity-aware proxies for SSH, Kubernetes, databases, RDP, and AI agents.