Gathering detailed insights and metrics for @nearform/multistream
Gathering detailed insights and metrics for @nearform/multistream
Gathering detailed insights and metrics for @nearform/multistream
Gathering detailed insights and metrics for @nearform/multistream
A stream that emits multiple other streams one after another (streams3)
npm install @nearform/multistream
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
294 Stars
139 Commits
25 Forks
8 Watchers
4 Branches
9 Contributors
Updated on Jun 18, 2025
Latest Version
5.0.0-2
Package Id
@nearform/multistream@5.0.0-2
Unpacked Size
8.95 kB
Size
3.38 kB
File Count
4
NPM Version
6.14.4
Node Version
13.12.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
This fork of multistream includes this patch by @ronag, and no other changes. This exists just to let Clinic.js use that patch. While the PR has not passed review yet, it is unlikely to make things worse in our specific case.
Simple, robust streams3 version of combined-stream. Allows you to combine multiple streams into a single stream. When the first stream ends, the next one starts, and so on, until all streams are consumed.
This module is used by WebTorrent, specifically create-torrent.
npm install multistream
Use multistream
like this:
1var MultiStream = require('multistream') 2var fs = require('fs') 3 4var streams = [ 5 fs.createReadStream(__dirname + '/numbers/1.txt'), 6 fs.createReadStream(__dirname + '/numbers/2.txt'), 7 fs.createReadStream(__dirname + '/numbers/3.txt') 8] 9 10new MultiStream(streams).pipe(process.stdout) // => 123
You can also create an object-mode stream with MultiStream.obj(streams)
.
To lazily create the streams, wrap them in a function:
1var streams = [ 2 fs.createReadStream(__dirname + '/numbers/1.txt'), 3 function () { // will be executed when the stream is active 4 return fs.createReadStream(__dirname + '/numbers/2.txt') 5 }, 6 function () { // same 7 return fs.createReadStream(__dirname + '/numbers/3.txt') 8 } 9] 10 11new MultiStream(streams).pipe(process.stdout) // => 123
Alternatively, streams may be created by an asynchronous "factory" function:
1var count = 0 2function factory (cb) { 3 if (count > 3) return cb(null, null) 4 count++ 5 setTimeout(function () { 6 cb(null, fs.createReadStream(__dirname + '/numbers/' + count + '.txt')) 7 }, 100) 8} 9 10new MultiStream(factory).pipe(process.stdout) // => 123
MIT. Copyright (c) Feross Aboukhadijeh.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 2/15 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
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