{"id":16527371,"url":"https://github.com/dipiash/enhanced-fetch-lib","last_synced_at":"2026-06-07T08:32:38.078Z","repository":{"id":36196692,"uuid":"221075157","full_name":"dipiash/enhanced-fetch-lib","owner":"dipiash","description":"Enhanced fetch library","archived":false,"fork":false,"pushed_at":"2023-01-05T01:03:07.000Z","size":1923,"stargazers_count":0,"open_issues_count":19,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-23T09:29:40.506Z","etag":null,"topics":["abortcontroller","fetch","polyfill"],"latest_commit_sha":null,"homepage":null,"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/dipiash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-11T21:40:31.000Z","updated_at":"2019-11-25T12:52:53.000Z","dependencies_parsed_at":"2023-01-16T23:19:53.800Z","dependency_job_id":null,"html_url":"https://github.com/dipiash/enhanced-fetch-lib","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/dipiash%2Fenhanced-fetch-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipiash%2Fenhanced-fetch-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipiash%2Fenhanced-fetch-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipiash%2Fenhanced-fetch-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dipiash","download_url":"https://codeload.github.com/dipiash/enhanced-fetch-lib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241610990,"owners_count":19990508,"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":["abortcontroller","fetch","polyfill"],"created_at":"2024-10-11T17:35:07.256Z","updated_at":"2026-06-07T08:32:36.633Z","avatar_url":"https://github.com/dipiash.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/enhanced-fetch-lib.svg)](https://badge.fury.io/js/enhanced-fetch-lib)\n\n# enhanced-fetch-lib\nCross browser wrapper for fetch.\n\nPolyfill is used under the hood:\n- [promise-polyfill](https://www.npmjs.com/package/promise-polyfill)\n- [whatwg-fetch](https://www.npmjs.com/package/whatwg-fetch)\n- [abortcontroller-polyfill](https://www.npmjs.com/package/abortcontroller-polyfill)\n\n## How to view example\nOpen `/example/index.html` in your browser.\n\n## Before start\n`npm i`\n\n## How to start project for development with example app\n1. `npm run development`, also you can use a production mode `npm run build`\n2. Open `/example/index.html` in your browser for test\n\n## How to build project for production\n1. `npm run build`\n\n## For usage: you can use script tag, import or require\n```js\n\u003cscript src=\"dist/index.js\"\u003e\u003c/script\u003e\n\nif (!window['enhancedFetch']) {\n    alert('\"enhancedFetch\" is not defined in window scope');\n\n    return;\n}\n\nvar { requestByFetch } = window['enhancedFetch'];\n\nvar fetchInstance = requestByFetch.createInstance({baseUrl: 'https://poller.jeetiss.now.sh',});\nvar abortC = fetchInstance.abortController();\n\nfetchInstance.fetch('/post', {\n    signal: abortC.signal,\n    method: 'POST',\n    mode: \"cors\",\n}, 10000,)\n    .then(res =\u003e res.json())\n    .then(res =\u003e {\n        console.log(res)\n    })\n    .catch(err =\u003e {\n        console.log(err)\n    });\n\nabortC.abort()\n```\nor\n```js\nimport enhancedFetch from 'enhanced-fetch-lib'\n```\nor\n```js\nconst enhancedFetch = require('enhanced-fetch-lib').default\n```\nor\n```js\nconst { enhancedFetch } = require('enhanced-fetch-lib')\n```\n\n## TODO\n- [x] Add unit tests\n- [ ] Improve example. Separate interface control from logic\n- [x] Publish into npm\n- [ ] Add CI\n- [ ] Add auto generation CHANGELOG and version - https://github.com/conventional-changelog/standard-version\n- [ ] Add ESLint rules\n- [ ] Add Prettier\n- [ ] Add husky and lint-staged\n- [ ] Add typings (TS or Flow)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdipiash%2Fenhanced-fetch-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdipiash%2Fenhanced-fetch-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdipiash%2Fenhanced-fetch-lib/lists"}