fetch-in-chunks
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "fetch-in-chunks", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "A utility for fetching large files in chunks with support for parallel downloads and progress tracking.", | ||
@@ -44,5 +44,5 @@ "main": "index.js", | ||
"http-server": "^14.1.1", | ||
"prettier": "^3.2.5", | ||
"prettier": "^3.3.2", | ||
"prettier-plugin-jsdoc": "^1.3.0" | ||
} | ||
} |
@@ -57,10 +57,3 @@ # fetch-in-chunks | ||
const blob = await fetchInChunks('https://example.com/largefile.zip'); | ||
// Create a download link and trigger the download | ||
const url = URL.createObjectURL(blob); | ||
const a = document.createElement('a'); | ||
a.href = url; | ||
a.download = 'largefile.zip'; | ||
document.body.appendChild(a); | ||
a.click(); | ||
URL.revokeObjectURL(url); | ||
return blob; | ||
} catch (error) { | ||
@@ -86,10 +79,3 @@ console.error('Error fetching file:', error); | ||
}); | ||
// Create a download link and trigger the download | ||
const url = URL.createObjectURL(blob); | ||
const a = document.createElement('a'); | ||
a.href = url; | ||
a.download = 'largefile.zip'; | ||
document.body.appendChild(a); | ||
a.click(); | ||
URL.revokeObjectURL(url); | ||
return blob; | ||
} catch (error) { | ||
@@ -116,10 +102,3 @@ console.error('Error fetching file:', error); | ||
}); | ||
// Create a download link and trigger the download | ||
const url = URL.createObjectURL(blob); | ||
const a = document.createElement('a'); | ||
a.href = url; | ||
a.download = 'largefile.zip'; | ||
document.body.appendChild(a); | ||
a.click(); | ||
URL.revokeObjectURL(url); | ||
return blob; | ||
} catch (error) { | ||
@@ -126,0 +105,0 @@ if (error.name === 'AbortError') { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19837
118