Node-core streams for userland
Installations
npm install readable-stream
Developer Guide
Typescript
No
Module System
CommonJS, UMD
Min. Node Version
^12.22.0 || ^14.17.0 || >=16.0.0
Node Version
22.12.0
NPM Version
10.9.0
Score
98.7
Supply Chain
99.6
Quality
86.8
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Languages
JavaScript (99.45%)
HTML (0.36%)
Shell (0.19%)
Developer
Download Statistics
Total Downloads
30,663,853,918
Last Day
29,844,768
Last Week
154,831,247
Last Month
555,126,090
Last Year
7,649,806,160
GitHub Statistics
1,034 Stars
475 Commits
230 Forks
58 Watching
49 Branches
79 Contributors
Bundle Size
76.56 kB
Minified
22.56 kB
Minified + Gzipped
Package Meta Information
Latest Version
4.7.0
Package Id
readable-stream@4.7.0
Unpacked Size
212.79 kB
Size
53.54 kB
File Count
35
NPM Version
10.9.0
Node Version
22.12.0
Publised On
07 Jan 2025
Total Downloads
Cumulative downloads
Total Downloads
30,663,853,918
Last day
-3.1%
29,844,768
Compared to previous day
Last week
-0.9%
154,831,247
Compared to previous week
Last month
-16.5%
555,126,090
Compared to previous month
Last year
9.2%
7,649,806,160
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
5
Dev Dependencies
28
readable-stream
Node.js core streams for userland
1npm install readable-stream
This package is a mirror of the streams implementations in Node.js 18.19.0.
Full documentation may be found on the Node.js website.
If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use readable-stream only and avoid the "stream" module in Node-core, for background see this blogpost.
As of version 2.0.0 readable-stream uses semantic versioning.
Version 4.x.x
v4.x.x of readable-stream
is a cut from Node 18. This version supports Node 12, 14, 16 and 18, as well as evergreen browsers.
The breaking changes introduced by v4 are composed of the combined breaking changes in:
This also includes many new features.
Version 3.x.x
v3.x.x of readable-stream
is a cut from Node 10. This version supports Node 6, 8, and 10, as well as evergreen browsers, IE 11 and latest Safari. The breaking changes introduced by v3 are composed by the combined breaking changes in Node v9 and Node v10, as follows:
- Error codes: https://github.com/nodejs/node/pull/13310, https://github.com/nodejs/node/pull/13291, https://github.com/nodejs/node/pull/16589, https://github.com/nodejs/node/pull/15042, https://github.com/nodejs/node/pull/15665, https://github.com/nodejs/readable-stream/pull/344
- 'readable' have precedence over flowing https://github.com/nodejs/node/pull/18994
- make virtual methods errors consistent https://github.com/nodejs/node/pull/18813
- updated streams error handling https://github.com/nodejs/node/pull/18438
- writable.end should return this. https://github.com/nodejs/node/pull/18780
- readable continues to read when push('') https://github.com/nodejs/node/pull/18211
- add custom inspect to BufferList https://github.com/nodejs/node/pull/17907
- always defer 'readable' with nextTick https://github.com/nodejs/node/pull/17979
Version 2.x.x
v2.x.x of readable-stream
is a cut of the stream module from Node 8 (there have been no semver-major changes from Node 4 to 8). This version supports all Node.js versions from 0.8, as well as evergreen browsers and IE 10 & 11.
Usage
You can swap your require('stream')
with require('readable-stream')
without any changes, if you are just using one of the main classes and
functions.
1const { 2 Readable, 3 Writable, 4 Transform, 5 Duplex, 6 pipeline, 7 finished 8} = require('readable-stream')
Note that require('stream')
will return Stream
, while
require('readable-stream')
will return Readable
. We discourage using
whatever is exported directly, but rather use one of the properties as
shown in the example above.
Usage In Browsers
You will need a bundler like browserify
, webpack
, parcel
or similar. Polyfills are no longer required since version 4.2.0.
Streams Working Group
readable-stream
is maintained by the Streams Working Group, which
oversees the development and maintenance of the Streams API within
Node.js. The responsibilities of the Streams Working Group include:
- Addressing stream issues on the Node.js issue tracker.
- Authoring and editing stream documentation within the Node.js project.
- Reviewing changes to stream subclasses within the Node.js project.
- Redirecting changes to streams from the Node.js project to this project.
- Assisting in the implementation of stream providers within Node.js.
- Recommending versions of
readable-stream
to be included in Node.js. - Messaging about the future of streams to give the community advance notice of changes.
Team Members
- Mathias Buus (@mafintosh) <mathiasbuus@gmail.com>
- Matteo Collina (@mcollina) <matteo.collina@gmail.com>
- Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
- Robert Nagy (@ronag) <ronagy@icloud.com>
- Vincent Weevers (@vweevers) <mail@vincentweevers.nl>
No vulnerabilities found.
Reason
GitHub workflow tokens follow principle of least privilege
Details
- Info: topLevel 'contents' permission set to 'read': .github/workflows/browsers.yml:6
- Info: topLevel 'contents' permission set to 'read': .github/workflows/bundlers.yml:6
- Info: topLevel 'contents' permission set to 'read': .github/workflows/lint.yml:6
- Info: topLevel 'contents' permission set to 'read': .github/workflows/node.yml:6
- Info: no jobLevel write permissions found
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/nodejs/.github/SECURITY.md:1
- Info: Found linked content: github.com/nodejs/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/nodejs/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/nodejs/.github/SECURITY.md:1
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Warn: project license file does not contain an FSF or OSI license.
Reason
Found 17/30 approved changesets -- score normalized to 5
Reason
7 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Info: Possibly incomplete results: error parsing shell code: invalid parameter name: .github/workflows/browsers.yml:38
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/browsers.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/nodejs/readable-stream/browsers.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/browsers.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/nodejs/readable-stream/browsers.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/browsers.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/nodejs/readable-stream/browsers.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bundlers.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/nodejs/readable-stream/bundlers.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bundlers.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/nodejs/readable-stream/bundlers.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bundlers.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/nodejs/readable-stream/bundlers.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/nodejs/readable-stream/lint.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/nodejs/readable-stream/lint.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/nodejs/readable-stream/lint.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/nodejs/readable-stream/node.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/nodejs/readable-stream/node.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/nodejs/readable-stream/node.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/browsers.yml:37
- Warn: npmCommand not pinned by hash: .github/workflows/bundlers.yml:41
- Warn: npmCommand not pinned by hash: .github/workflows/lint.yml:31
- Warn: npmCommand not pinned by hash: .github/workflows/node.yml:40
- Info: 0 out of 12 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 4 npmCommand dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
- Warn: branch protection not enabled for branch 'v3.x'
- Warn: branch protection not enabled for branch 'v2.x'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 19 are checked with a SAST tool
Score
5.9
/10
Last Scanned on 2025-01-13
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More