{"id":15639651,"url":"https://github.com/samundrak/fetch-progress","last_synced_at":"2025-08-23T09:11:45.492Z","repository":{"id":48034135,"uuid":"128248129","full_name":"samundrak/fetch-progress","owner":"samundrak","description":"Progress of response for fetch API","archived":false,"fork":false,"pushed_at":"2023-03-01T19:40:05.000Z","size":695,"stargazers_count":89,"open_issues_count":20,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-10T18:29:28.850Z","etag":null,"topics":["ecmascript","fetch","javascript","progress"],"latest_commit_sha":null,"homepage":"https://samundrak.github.io/fetch-progress/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samundrak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["samundrak"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-04-05T18:33:08.000Z","updated_at":"2025-07-17T15:12:49.000Z","dependencies_parsed_at":"2024-06-18T16:45:55.369Z","dependency_job_id":"627ce343-34b9-41e2-bb35-aea2515549a4","html_url":"https://github.com/samundrak/fetch-progress","commit_stats":{"total_commits":24,"total_committers":8,"mean_commits":3.0,"dds":0.5,"last_synced_commit":"9b3bd9aacded32cf56c599c5666c362691ac7949"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/samundrak/fetch-progress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samundrak%2Ffetch-progress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samundrak%2Ffetch-progress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samundrak%2Ffetch-progress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samundrak%2Ffetch-progress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samundrak","download_url":"https://codeload.github.com/samundrak/fetch-progress/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samundrak%2Ffetch-progress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271746302,"owners_count":24813557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ecmascript","fetch","javascript","progress"],"created_at":"2024-10-03T11:26:50.508Z","updated_at":"2025-08-23T09:11:45.453Z","avatar_url":"https://github.com/samundrak.png","language":"JavaScript","funding_links":["https://github.com/sponsors/samundrak"],"categories":[],"sub_categories":[],"readme":"# [Fetch Progress](https://samundrak.github.io/fetch-progress)\n\nProgress of response for fetch API.\nGet progress report of your response called from fetch like percentage, speed, total, transferred, eta and remaining.\n\n## Install\n\n`npm i fetch-progress`\n\n## Usage\n\nimport `fetchProgress` method to your project\n\n```js\nimport fetchProgress from 'fetch-progress\n```\n\nNow use `fetchProgress` method on your fetch calls, try to put this before using response. You can\n\n```js\nfetch(this.props.src)\n    .then(\n      fetchProgress({\n        // implement onProgress method\n        onProgress(progress) {\n          console.log({ progress });\n          // A possible progress report you will get\n          // {\n          //    total: 3333,\n          //    transferred: 3333,\n          //    speed: 3333,\n          //    eta: 33,\n          //    percentage: 33\n          //    remaining: 3333,\n          // }\n        },\n      })\n    )\n```\n\n# Example\n\n```js\nimport fetchProgress from '../index';\n\nconst self = this;\n    fetch(this.props.src)\n      .then(\n        fetchProgress({\n          onProgress(progress) {\n            self.setState({ progress });\n          },\n          onError(err) {\n            console.log(err);\n          },\n        })\n      )\n      .then(r =\u003e r.blob())\n      .then(src =\u003e {\n        this.src = URL.createObjectURL(src);\n        this.setState({\n          loaded: true,\n        });\n      });\n```\n\n# Demo\n\n[Live Demo](https://samundrak.github.io/fetch-progress)\n\nClone this repo and run `npm i` and `npm run dev` which will start a server or you can see `examples/` folder in this repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamundrak%2Ffetch-progress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamundrak%2Ffetch-progress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamundrak%2Ffetch-progress/lists"}