{"id":16588502,"url":"https://github.com/oliverjash/fun-task-fetch","last_synced_at":"2025-08-20T15:05:58.698Z","repository":{"id":146156032,"uuid":"82797823","full_name":"OliverJAsh/fun-task-fetch","owner":"OliverJAsh","description":" fetch API implemented using the Task type, which allows cancellation amongst other things.","archived":false,"fork":false,"pushed_at":"2017-02-22T11:41:26.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-16T22:12:43.777Z","etag":null,"topics":["fetch","fetch-api","functional-programming","task"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OliverJAsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-02-22T11:41:21.000Z","updated_at":"2018-04-01T19:48:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"b9b32ea6-447a-41e2-ab3f-b9a5016148ca","html_url":"https://github.com/OliverJAsh/fun-task-fetch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OliverJAsh%2Ffun-task-fetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OliverJAsh%2Ffun-task-fetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OliverJAsh%2Ffun-task-fetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OliverJAsh%2Ffun-task-fetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OliverJAsh","download_url":"https://codeload.github.com/OliverJAsh/fun-task-fetch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242198097,"owners_count":20087949,"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","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":["fetch","fetch-api","functional-programming","task"],"created_at":"2024-10-11T22:56:50.216Z","updated_at":"2025-03-06T11:23:26.475Z","avatar_url":"https://github.com/OliverJAsh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fun-task fetch\n\n[`fetch`](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) API implemented using the [`Task`\ntype](https://github.com/rpominov/fun-task), which [allows cancellation amongst\nother things](https://github.com/rpominov/fun-task#what-is-a-task).\n\nThis is just a proof of concept and needs more work. Example:\n\n``` js\nimport cancellableFetch from './index';\n\nconst url = 'https://jsonplaceholder.typicode.com/posts'\nconst task = cancellableFetch(url, { method: 'GET' })\n\nconst cancel = task.run({\n    success(result) {\n        console.log('success', { result })\n    },\n    failure(result) {\n        console.log('failure', { result })\n    }\n})\n\nsetTimeout(cancel, 500)\n```\n\n## Development\n\n```\nyarn\nyarn build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliverjash%2Ffun-task-fetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foliverjash%2Ffun-task-fetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliverjash%2Ffun-task-fetch/lists"}