@@ -25,26 +25,19 @@ import fetchInChunks from 'fetch-in-chunks';
2525async function fetchInChunks (url , options = {})
2626```
2727
28- ### Options Object
29-
30- - `chunkSize` (`number`, optional): The size of each chunk in bytes. Defaults to
31- 5 MB (5 _ 1024 _ 1024).
32- - `maxParallelRequests` (`number`, optional): The maximum number of parallel
33- chunk requests. Defaults to 6. `progressCallback` (`function`, optional): A
34- callback function that is called with the downloaded bytes and total file
35- size. `signal` (`AbortSignal`, optional): An `AbortSignal` to allow aborting
36- the request.
37-
3828#### Parameters
3929
4030- `url` (`string`): The URL of the file to download.
41- - `chunkSize` (`number`, optional): The size of each chunk in bytes. Defaults to
42- 5 MB.
43- - `maxParallelRequests` (`number`, optional): The maximum number of parallel
44- chunk requests. Defaults to 6.
45- - `progressCallback` (`function`, optional): A callback function that is called
46- with the downloaded bytes and total file size. `signal` (`AbortSignal`,
47- optional): An `AbortSignal` to allow aborting the request.
31+ - `options` (`object`, optional): An object containing additional options.
32+ - `options.chunkSize` (`number`, default: `5 * 1024 * 1024`): The size of each
33+ chunk to download in bytes.
34+ - `options.maxParallelRequests` (`number`, default: `1`): The number of chunks
35+ to download in parallel.
36+ - `options.progressCallback` (`function`, optional): A callback function that
37+ will be called with the number of bytes downloaded and the total size of the
38+ file.
39+ - `options.signal` (`AbortSignal`, optional): An `AbortSignal` object that can
40+ be used to abort the download.
4841
4942#### Returns
5043
0 commit comments