Gathering detailed insights and metrics for @ljharb/through
Gathering detailed insights and metrics for @ljharb/through
Gathering detailed insights and metrics for @ljharb/through
Gathering detailed insights and metrics for @ljharb/through
simple way to create a ReadableWritable stream that works
npm install @ljharb/through
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.3
Supply Chain
93.9
Quality
76.4
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3 Stars
129 Commits
3 Watchers
1 Branches
1 Contributors
Updated on Feb 08, 2025
Latest Version
2.3.14
Package Id
@ljharb/through@2.3.14
Unpacked Size
31.97 kB
Size
10.61 kB
File Count
15
NPM Version
10.9.2
Node Version
23.7.0
Published on
Feb 08, 2025
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
Note: This package is a fork of https://npmjs.com/through, and builds off of it.
Easy way to create a Stream
that is both readable
and writable
.
write
and end
methods.through
takes care of pause/resume logic if you use this.queue(data)
instead of this.emit('data', data)
.this.pause()
and this.resume()
to manage flow.this.paused
to see current flow state. (write
always returns !this.paused
).This function is the basis for most of the synchronous streams in event-stream.
1var through = require('@ljharb/through') 2 3through(function write(data) { 4 this.queue(data) //data *must* not be null 5 }, 6 function end () { //optional 7 this.queue(null) 8 })
Or, can also be used without buffering on pause, use this.emit('data', data)
,
and this.emit('end')
1var through = require('@ljharb/through') 2 3through(function write(data) { 4 this.emit('data', data) 5 //this.pause() 6 }, 7 function end () { //optional 8 this.emit('end') 9 })
You will probably not need these 99% of the time.
By default, through
emits close when the writable
and readable side of the stream has ended.
If that is not desired, set autoDestroy=false
.
1var through = require('@ljharb/through') 2 3//like this 4var ts = through(write, end, {autoDestroy: false}) 5//or like this 6var ts = through(write, end) 7ts.autoDestroy = false
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
0 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 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