Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fetch-in-chunks

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-in-chunks - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

package.json
{
"name": "fetch-in-chunks",
"version": "1.1.0",
"version": "1.1.1",
"description": "A utility for fetching large files in chunks with support for parallel downloads and progress tracking.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -28,22 +28,15 @@ # fetch-in-chunks

### Options Object
- `chunkSize` (`number`, optional): The size of each chunk in bytes. Defaults to
5 MB (5 _ 1024 _ 1024).
- `maxParallelRequests` (`number`, optional): The maximum number of parallel
chunk requests. Defaults to 6. `progressCallback` (`function`, optional): A
callback function that is called with the downloaded bytes and total file
size. `signal` (`AbortSignal`, optional): An `AbortSignal` to allow aborting
the request.
#### Parameters
- `url` (`string`): The URL of the file to download.
- `chunkSize` (`number`, optional): The size of each chunk in bytes. Defaults to
5 MB.
- `maxParallelRequests` (`number`, optional): The maximum number of parallel
chunk requests. Defaults to 6.
- `progressCallback` (`function`, optional): A callback function that is called
with the downloaded bytes and total file size. `signal` (`AbortSignal`,
optional): An `AbortSignal` to allow aborting the request.
- `options` (`object`, optional): An object containing additional options.
- `options.chunkSize` (`number`, default: `5 * 1024 * 1024`): The size of each
chunk to download in bytes.
- `options.maxParallelRequests` (`number`, default: `1`): The number of chunks
to download in parallel.
- `options.progressCallback` (`function`, optional): A callback function that
will be called with the number of bytes downloaded and the total size of the
file.
- `options.signal` (`AbortSignal`, optional): An `AbortSignal` object that can
be used to abort the download.

@@ -50,0 +43,0 @@ #### Returns

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc