stream-browserify
A browser-compatible shim of Node.js core's stream module
Repository Health
Technical Analysis
stream-browserify re-implements Node.js’s built-in stream module (Readable, Writable, Duplex, Transform) on top of readable-stream so that code written against Node’s stream API can run unmodified in a browser. It is the standard shim that bundlers like Browserify and webpack substitute automatically whenever bundled code does require('stream').
Because so much of the npm ecosystem is written stream-first (parsers, crypto pipelines, file processing utilities originally built for Node), this tiny package is a load-bearing piece of infrastructure: without it, a huge share of npm packages would simply fail to bundle for the browser. It has effectively been feature-complete and stable since 2020, needing no further changes because its job — mirroring a stable Node core API — doesn’t change.
What You Get
- Browser-compatible Stream, Readable, Writable, Duplex, and Transform classes matching Node core’s stream API surface
- Automatic substitution by Browserify and webpack’s node-libs-browser polyfills whenever bundled code requires(‘stream’)
- A thin wrapper delegating to
readable-stream, so behavior tracks Node’s actual stream semantics rather than reinventing them - Zero-configuration compatibility for npm packages that were written assuming a Node.js environment
Common Use Cases
- Bundling an npm package originally written for Node.js (parsers, hashing pipelines, file-processing utilities) so it runs in a browser via Browserify or webpack
- Building browser-based tooling that needs to reuse Node-style stream-based libraries without a server component
- Polyfilling
require('stream')calls in legacy bundler configurations that don’t provide Node core module shims automatically - Running shared isomorphic code (same source for Node and browser) that depends on stream semantics
Under The Hood
Architecture The entire package is a single index.js file that defines a Stream constructor inheriting from Node’s EventEmitter (via the inherits helper) and attaches Stream.Readable, Stream.Writable, Stream.Duplex, and Stream.Transform as re-exports of the corresponding classes from the readable-stream package — the architecture is deliberately minimal: it is a compatibility shim, not an original stream implementation, so all actual stream logic (backpressure, piping, buffering) lives in readable-stream, which itself mirrors Node core’s C++/JS stream implementation in pure JavaScript.
Tech Stack Plain JavaScript (pre-ES6 module style, module.exports), with two runtime dependencies: inherits for prototype chaining and readable-stream for the actual stream implementation; it has no build step, no TypeScript, and no bundler config of its own since its entire purpose is to be bundled into other packages’ output by Browserify/webpack.
Code Quality The test suite (test/index.js, run via tape and cross-browser via airtap) exercises the package specifically for browser compatibility per the historical .airtap.yml matrix covering IE8+, older Firefox/Chrome/Safari/Opera, and mobile browsers — appropriate rigor for a compatibility shim whose entire value proposition is ‘works everywhere,’ though the code itself is intentionally tiny (roughly 15 lines) since it delegates almost everything to readable-stream.
API Design There is effectively no API design decision to make — the package’s entire contract is ‘be exactly what require('stream') returns in Node,’ so consumers never interact with it directly; it just needs to keep matching Node’s stream module shape, which has been stable for years, explaining why the package has needed no updates since 2020 without being abandoned in any meaningful sense.
Used by 16 apps in this directory
Actual
Invoicing Finance
Local-first personal finance with envelope budgeting, end-to-end encryption, and multi-device sync — no subscription required.
AionUi
AI Agents · Productivity
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.
APITable
Low Code Platforms · Databases
API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.
Claude Context
AI Code Assistants
An MCP server and VS Code extension by Zilliz that turns your entire codebase into semantically searchable context for Claude Code, Cursor, and Gemini CLI, using vector embeddings and Merkle-tree change detection.
CodeSandbox
Code Editors · Developer Tools
Instantly ready browser-based IDE that runs full npm dependency resolution and transpilation entirely client-side, with no server needed.
hoodik
File Storage · Security
Self-hosted, end-to-end encrypted cloud storage with browser-based encryption and S3-compatible storage support
Hoppscotch
Developer Tools
A lightweight, offline-capable API development ecosystem for testing HTTP, GraphQL, WebSocket, MQTT, and SSE endpoints across web, desktop, and CLI.
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.
Mattermost
Team Chat · Collaboration · Devops
Open core, self-hosted team collaboration with chat, AI agents, voice calling, and deep DevOps integrations — all under your control.