stream-browserify

A browser-compatible shim of Node.js core's stream module

Library
npm
v3.0.0
105 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
40 /100 Fair
Development Activity 0
Maintenance 20
Community 68
Maturity 60
Momentum 12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
65 /100 Good
Architecture 62
Code Quality 68
Innovation 40
Learning Curve 90

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

Clojure
57%
Other

Metabase

Analytics

49,827

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.

View details
95
Repo Health
84
Technical
62
Dependency
Built with
Clojure 57%
TypeScript 38%
Updated 5 days ago
Python
58%
Apache 2.0

MLflow

AI Development · Monitoring

28,512

The open source AI engineering platform for debugging, evaluating, monitoring, and optimizing production LLMs and agents at scale.

View details
96
Repo Health
86
Technical
67
Dependency
Built with
Python 58%
TypeScript 35%
Updated 5 days ago
TypeScript
92%
Other

n8n

Automation · No Code Platforms

208,437

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
62
Dependency
Built with
TypeScript 92%
Updated 6 days ago
Python
55%
Other

PostHog

Ab Testing Experimentation · Analytics · Developer Tools

40,397

The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.

View details
92
Repo Health
80
Technical
65
Dependency
Built with
Python 55%
TypeScript 36%
Updated 5 days ago
Python
45%
Other

Redash

Analytics · Data Engineering

28,849

Redash lets anyone connect to 35+ SQL and NoSQL data sources, write a query in the browser, and turn the result into a shared dashboard — no separate BI suite required.

View details
91
Repo Health
74
Technical
61
Dependency
Built with
Python 45%
JavaScript 29%
TypeScript 19%
Updated 1 weeks ago
TypeScript
99%
Other

Rowy

Databases · Low Code Platforms

6,842

Manage Firestore data in an Airtable-like spreadsheet UI and build Cloud Functions workflows directly in your browser—on your own GCP project.

View details
45
Repo Health
71
Technical
65
Dependency
Built with
TypeScript 99%
Updated 1 years ago
JavaScript
93%
Apache 2.0

swagger-ui

Developer Tools

29,042

Transform OpenAPI specifications into interactive, browser-based API documentation that developers and consumers can explore and test live.

View details
98
Repo Health
83
Technical
62
Dependency
Built with
JavaScript 93%
Updated 6 days ago

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