Gathering detailed insights and metrics for @gmod/http-range-fetcher
Gathering detailed insights and metrics for @gmod/http-range-fetcher
Gathering detailed insights and metrics for @gmod/http-range-fetcher
Gathering detailed insights and metrics for @gmod/http-range-fetcher
request-merging fetch manager for doing large numbers of HTTP range requests
npm install @gmod/http-range-fetcher
Typescript
Module System
76.2
Supply Chain
90.7
Quality
86.5
Maintenance
100
Vulnerability
100
License
TypeScript (89.11%)
JavaScript (10.89%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
9 Stars
133 Commits
4 Watchers
7 Branches
3 Contributors
Updated on May 13, 2025
Latest Version
5.0.1
Package Id
@gmod/http-range-fetcher@5.0.1
Unpacked Size
118.71 kB
Size
32.35 kB
File Count
51
Published on
May 13, 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
Cache/manager for HTTP byte-range requests that merges requests together and caches results. Designed for applications that request lots of small byte ranges over HTTP that are often adjacent to each other.
Works both in node or webpack/browserify. Respects HTTP caching semantics, with
the exception of setting a default minimum TTL of 1 second on requests that are
not really supposed to be cached (e.g. Cache-Control: no-cache
). You can turn
that behavior off by setting minimumTTL
to 0 though.
$ npm install --save http-range-fetcher
1const { HttpRangeFetcher } = require('http-range-fetcher') 2 3const cache = new HttpRangeFetcher({}) 4cache.getRange('http://foo.bar/baz.bam', 20, 10).then(response => { 5 assert(response.buffer.length === 10) 6 assert(response.headers['content-range'] === '20-29/23422') 7 // response objects contain `headers` and `buffer`. the `headers` object 8 // contains the original headers that came from the server in response to the 9 // aggregated call, except the Content-Range header has been overwritten 10 // to match the requested range, and it adds a X-Resource-Length header that 11 // conveniently gives the total length of the remote resource so you don't 12 // have to parse the Content-Range header. 13 assert(response.headers['x-resource-length'] === '23422') 14}) 15 16// these will be aggregated behind the scenes 17// as a single request for a big chunk of the remote file, 18// which will be cached to satisfy subsequent requests 19Promise.all([ cache.getRange('http://foo.bar/baz.bam', 20, 10), cache.getRange('http://foo.bar/baz.bam', 30, 10), cache.getRange('http://foo.bar/baz.bam', 40, 10), cache.getRange('http://foo.bar/baz.bam', 50, 10), cache.getRange('http://foo.bar/baz.bam', 60, 10), cache.getRange('http://foo.bar/baz.bam', 70, 10),]).then(fetchResults => { 20 fetchResults.forEach(res => assert(res.buffer.length === 10)) 21})
This package was written with funding from the NHGRI as part of the JBrowse project. If you use it in an academic project that you publish, please cite the most recent JBrowse paper, which will be linked from jbrowse.org.
MIT © Robert Buels
Renamed http-range-fetcher -> @gmod/http-range-fetcher in 2024
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
2 existing vulnerabilities detected
Details
Reason
6 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
Reason
Found 1/28 approved changesets -- 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
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