Gathering detailed insights and metrics for minipass-collect
Gathering detailed insights and metrics for minipass-collect
Gathering detailed insights and metrics for minipass-collect
Gathering detailed insights and metrics for minipass-collect
A Minipass stream that collects all the data into a single chunk
npm install minipass-collect
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
2 Stars
23 Commits
3 Forks
3 Watching
3 Branches
2 Contributors
Updated on 05 Feb 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-4.6%
3,025,794
Compared to previous day
Last week
3.3%
17,285,360
Compared to previous week
Last month
7%
71,780,746
Compared to previous month
Last year
20.6%
763,869,253
Compared to previous year
A Minipass stream that collects all the data into a single chunk
Note that this buffers ALL data written to it, so it's only good for situations where you are sure the entire stream fits in memory.
Note: this is primarily useful for the Collect.PassThrough
class, since
Minipass streams already have a .collect()
method which returns a promise
that resolves to the array of chunks, and a .concat()
method that returns
the data concatenated into a single Buffer or String.
1const Collect = require('minipass-collect') 2 3const collector = new Collect() 4collector.on('data', allTheData => { 5 console.log('all the data!', allTheData) 6}) 7 8someSourceOfData.pipe(collector) 9 10// note that you can also simply do: 11someSourceOfData.pipe(new Minipass()).concat().then(data => ...) 12// or even, if someSourceOfData is a Minipass: 13someSourceOfData.concat().then(data => ...) 14// but you might prefer to have it stream-shaped rather than 15// Promise-shaped in some scenarios.
If you want to collect the data, but also act as a passthrough stream,
then use Collect.PassThrough
instead (for example to memoize streaming
responses), and listen on the collect
event.
1const Collect = require('minipass-collect') 2 3const collector = new Collect.PassThrough() 4collector.on('collect', allTheData => { 5 console.log('all the data!', allTheData) 6}) 7 8someSourceOfData.pipe(collector).pipe(someOtherStream)
All minipass options are supported.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
5 existing vulnerabilities detected
Details
Reason
Found 0/23 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
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
security policy file not detected
Details
Score
Last Scanned on 2024-11-25
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