A lightweight JavaScript library that adds progress tracking (percentage, speed, ETA, transferred bytes) to the standard fetch API. Current stable version is 1.3.0, released irregularly. Key differentiator: simple wrapper around fetch that provides real-time progress without replacing the native fetch. Ships TypeScript types. Suitable for browser and Node environments with fetch support. No dependencies, zero-config.
npm install fetch-progressNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to wrap a fetch call to track download progress with percentage and ETA.
Ensure fetchProgress() is applied immediately after fetch, before any .then that reads the body.
Check for progress.total !== undefined before using percentage.
Remove onError option and use .catch() on the fetch promise.
Use XMLHttpRequest or another library (e.g., axios with onUploadProgress) for upload progress.
Use 'import fetchProgress from "fetch-progress"' (no curly braces).
Use response.clone() before calling fetchProgress, or restructure your code to read body after progress completes.
Guard with if (progress.total !== undefined) before accessing progress.total.
No dependency data recorded yet.