Gathering detailed insights and metrics for range-slice-stream
Gathering detailed insights and metrics for range-slice-stream
Gathering detailed insights and metrics for range-slice-stream
Gathering detailed insights and metrics for range-slice-stream
npm install range-slice-stream
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
5 Stars
17 Commits
1 Forks
3 Watchers
2 Branches
3 Contributors
Updated on Apr 04, 2025
Latest Version
3.0.0
Package Id
range-slice-stream@3.0.0
Unpacked Size
5.96 kB
Size
2.76 kB
File Count
5
NPM Version
10.2.4
Node Version
21.4.0
Published on
Dec 15, 2023
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
2
Extract a bunch of ranges from a stream to construct a new stream
1const RangeSliceStream = require('range-slice-stream') 2 3const slicer = new RangeSliceStream() 4slicer.end('abcdefghijklmnop') 5 6const out = slicer.slice([ 7 { start: 1, end: 3 }, 8 { start: 6, end: 9 } 9]) 10 11out.pipe(process.stdout) 12 13// Prints 'bcghi'
var slicer = new RangeSliceStream([offset[, opts]])
Create a new slicer, which is a writable stream.
If an offset
is provided, it is subtracted from all range offsets. This
makes it more intuitive to use if the incoming data stream itself starts
at an offset into an underlying resource like a file.
opts
is passed to the underlying writable stream constructor.
var slice = slicer.slice([{start: <s1>, end: <e1>}, {start: <s2>, end: <e2>},...])
Get a new readable stream that is built by concatenating the data from one
or more byte ranges of the data piped into the slicer. Like the Buffer.slice()
method, start
is inclusive and end
is exclusive.
slice()
can be called multiple times to generate multiple streams built from
different sets of ranges. However, all ranges must be provided in increasing
order, both within a given call to slice()
and between calls.
Data between ranges is discarded. Once all ranges specified by slice()
calls
are satisfied, backpressure will be applied to the incoming stream until the
next desired range is specified by calling slice()
again.
slicer.satisfied
Boolean that is true when all slice()
calls have been satisfied and
backpressure is applied. In addition, the satisfied
event is emitted
when slicer.satisfied
becomes true.
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 2/15 approved changesets -- score normalized to 1
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
security policy file not detected
Details
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