Ensure that a stream is flowing data without mutating it
Installations
npm install stream-exhaust
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
8.3.0
NPM Version
5.3.0
Score
99.9
Supply Chain
76.2
Quality
75.2
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
Download Statistics
Total Downloads
341,339,308
Last Day
242,035
Last Week
1,093,624
Last Month
4,891,217
Last Year
64,896,055
GitHub Statistics
13 Stars
10 Commits
4 Forks
3 Watching
1 Branches
3 Contributors
Bundle Size
505.00 B
Minified
301.00 B
Minified + Gzipped
Package Meta Information
Latest Version
1.0.2
Package Id
stream-exhaust@1.0.2
Size
1.94 kB
NPM Version
5.3.0
Node Version
8.3.0
Publised On
30 Aug 2017
Total Downloads
Cumulative downloads
Total Downloads
341,339,308
Last day
-5.8%
242,035
Compared to previous day
Last week
-15.1%
1,093,624
Compared to previous week
Last month
3.9%
4,891,217
Compared to previous month
Last year
4.6%
64,896,055
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
3
stream-exhaust
Ensure that the provided stream is flowing data, even if the stream hasn't been piped to another stream.
1var exhaustively = require('stream-exhaust'); 2 3exhaustively(fs.createReadStream(__filename)) 4 .on('close', () => { console.log('all done, despite being streams{1+N}!') });
Prior Art
This is based on stream-consume by aroneous. It is a separate package because it has different semantics:
- It does not call
.resume()
on streams2+ streams. streams2 streams monkeypatch.pipe
when entering flowing mode; avoidingresume()
avoids that fate. - It does not examine
._readableState
; instead it checks for the presence of._read
.
API
exhaust(Stream s) -> Stream s
Takes a stream, s
, and returns it. Ensures that the stream is flowing, either by calling
.resume()
if the stream is a streams1 stream, or by piping it to a "black hole" stream that
continually asks for more data.
License
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 2/9 approved changesets -- score normalized to 2
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
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 3 are checked with a SAST tool
Score
2.9
/10
Last Scanned on 2025-02-03
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