Gathering detailed insights and metrics for minipass-sized
Gathering detailed insights and metrics for minipass-sized
Gathering detailed insights and metrics for minipass-sized
Gathering detailed insights and metrics for minipass-sized
A Minipass stream that raises an error if you get a different number of bytes than expected
npm install minipass-sized
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
ISC License
5 Stars
13 Commits
1 Forks
2 Watchers
10 Branches
1 Contributors
Updated on May 08, 2021
Latest Version
1.0.3
Package Id
minipass-sized@1.0.3
Size
30.06 kB
NPM Version
6.12.0-next.0
Node Version
12.8.1
Published on
Sep 30, 2019
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
A Minipass stream that raises an error if you get a different number of bytes than expected.
Use just like any old minipass stream, but
provide a size
option to the constructor.
The size
option must be a positive integer, smaller than
Number.MAX_SAFE_INTEGER
.
1const MinipassSized = require('minipass-sized') 2// figure out how much data you expect to get 3const expectedSize = +headers['content-length'] 4const stream = new MinipassSized({ size: expectedSize }) 5stream.on('error', er => { 6 // if it's the wrong size, then this will raise an error with 7 // { found: <number>, expect: <number>, code: 'EBADSIZE' } 8}) 9response.pipe(stream)
Caveats: this does not work with objectMode
streams, and will throw a
TypeError
from the constructor if the size argument is missing or
invalid.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/13 approved changesets -- score normalized to 0
Reason
no SAST tool detected
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
Reason
35 existing vulnerabilities detected
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