Gathering detailed insights and metrics for @sindresorhus/merge-streams
Gathering detailed insights and metrics for @sindresorhus/merge-streams
Gathering detailed insights and metrics for @sindresorhus/merge-streams
Gathering detailed insights and metrics for @sindresorhus/merge-streams
Merge multiple streams into a unified stream
npm install @sindresorhus/merge-streams
99.4
Supply Chain
83.3
Quality
81.7
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
54 Stars
37 Commits
4 Watching
1 Branches
2 Contributors
Updated on 15 Nov 2024
JavaScript (97.45%)
TypeScript (2.55%)
Cumulative downloads
Total Downloads
Last day
-3.6%
1,223,129
Compared to previous day
Last week
2.4%
6,857,920
Compared to previous week
Last month
9.4%
28,646,375
Compared to previous month
Last year
18,876.3%
183,499,910
Compared to previous year
7
Merge multiple streams into a unified stream
1npm install @sindresorhus/merge-streams
1import mergeStreams from '@sindresorhus/merge-streams'; 2 3const stream = mergeStreams([streamA, streamB]); 4 5for await (const chunk of stream) { 6 console.log(chunk); 7 //=> 'A1' 8 //=> 'B1' 9 //=> 'A2' 10 //=> 'B2' 11}
mergeStreams(streams: stream.Readable[]): MergedStream
Merges an array of readable streams and returns a new readable stream that emits data from the individual streams as it arrives.
If you provide an empty array, the stream remains open but can be manually ended.
MergedStream
Type: stream.Readable
A single stream combining the output of multiple streams.
MergedStream.add(stream: stream.Readable): void
Pipe a new readable stream.
Throws if MergedStream
has already ended.
MergedStream.remove(stream: stream.Readable): Promise<boolean>
Unpipe a stream previously added using either mergeStreams(streams)
or MergedStream.add(stream)
.
Returns false
if the stream was not previously added, or if it was already removed by MergedStream.remove(stream)
.
The removed stream is not automatically ended.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 20/30 approved changesets -- score normalized to 6
Reason
1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
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