{"_id":"return-fetch","_rev":"24-a8fd9e433fd2737fdb93dd8b186c0d01","name":"return-fetch","dist-tags":{"latest":"0.4.13"},"versions":{"0.1.3":{"name":"return-fetch","version":"0.1.3","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.1.3","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://github.com/deer-develop/return-fetch#readme","bugs":{"url":"https://github.com/deer-develop/return-fetch/issues"},"dist":{"shasum":"34e3ec490112b1424eec8d793585c8251dd89eca","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.1.3.tgz","fileCount":11,"integrity":"sha512-F+hayEo0POQZe5Mzh91xy75q2aeozN4S9b92RIG2A/2JWE3C9YzGYJUz+NOR7SwP8E3E7f8W0AsNGLSddvypMA==","signatures":[{"sig":"MEYCIQCuPnSk+6Y/2CxX6ZHr6fPrH+BeQ3eNnACDE570uf245wIhANP7V38TR2nic9t3tYKd/SCmkpaJlyhxK2tXivX5Vce3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19568},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"ee4df865c8ad7fcfdd87092fe99231b90fa420b7","scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run","build":"npm run clean && microbundle --format modern,cjs,umd && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"npm run clean && tsc -w","coverage":"vitest run --coverage","prettier":"prettier . --write","test:watch":"vitest","lint-staged":"lint-staged","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"repository":{"url":"git+https://github.com/deer-develop/return-fetch.git","type":"git"},"_npmVersion":"9.6.7","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"20.3.1","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@typescript-eslint/parser":"^6.2.0","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.1.3_1690466676520_0.13618568971763145","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"return-fetch","version":"0.2.0","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.2.0","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://github.com/deer-develop/return-fetch#readme","bugs":{"url":"https://github.com/deer-develop/return-fetch/issues"},"dist":{"shasum":"f0e4c8ef257cffd737f79e3878df7925e5672fdd","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.2.0.tgz","fileCount":11,"integrity":"sha512-oRaUHhEV5qgE4YZM//BehnFw7Kd9QzIyGanTvKc+a4vj27L04SSYSkew2dxERsmPvAv1DoD2Csh5uQX05/swHQ==","signatures":[{"sig":"MEYCIQDVDvQmlCrpkzymB4Z5KBD+5jt6KttYjoI4gjyogA2q1wIhAN3cLMh7ZzeaugQVPSD78nllWvWN1/gV6sNzB2ckNUDc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19658},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"f29bf5889a4ab1fab5b19548601df29b27d49603","scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run","build":"npm run clean && microbundle --format modern,cjs,umd && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"npm run clean && tsc -w","coverage":"vitest run --coverage","prettier":"prettier . --write","test:watch":"vitest","lint-staged":"lint-staged","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"repository":{"url":"git+https://github.com/deer-develop/return-fetch.git","type":"git"},"_npmVersion":"9.6.7","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"20.3.1","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@typescript-eslint/parser":"^6.2.0","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.2.0_1690468084068_0.9605023995691018","host":"s3://npm-registry-packages"}},"0.2.2":{"name":"return-fetch","version":"0.2.2","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.2.2","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","bugs":{"url":"https://github.com/deer-develop/return-fetch/issues"},"dist":{"shasum":"6b0dabc3bbdb8ab44eb37bc0196d5f667e9363f9","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.2.2.tgz","fileCount":8,"integrity":"sha512-2dQe7QDIVmFY6L/SYFNFZRjhOfNwJgWCUDK58cw2kZxAmpjWi7pBqFly95+sV1pP1ax7FHDyyowOpvGgM7F58A==","signatures":[{"sig":"MEUCIQCYIIlYJud94yJAOldvP6U9kKROhY2FaFbQ224fkWA9KAIgDvk9ADjzIAtZSi6qSVwAnsGiT7NbjCMTj4pEBkFXa0g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24604},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"6909956cafcf9f0ad8993d8bedbacc7600cfa638","scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd --sourcemap false","coverage":"vitest run --coverage","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest","lint-staged":"lint-staged","postinstall":"pnpm run bundle","prepublishOnly":"pnpm run test && pnpm run build"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"repository":{"url":"git+https://github.com/deer-develop/return-fetch.git","type":"git"},"_npmVersion":"9.6.7","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"20.3.1","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.2.2_1690620075227_0.2948348546163724","host":"s3://npm-registry-packages"}},"0.2.3":{"name":"return-fetch","version":"0.2.3","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.2.3","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","bugs":{"url":"https://github.com/deer-develop/return-fetch/issues"},"dist":{"shasum":"ca27ff57232299a3cfb4180955bdf160f3ef983f","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.2.3.tgz","fileCount":11,"integrity":"sha512-P8BbdGAwnM2d+ykwCP+dP7N5EGT4Ow2efYq94wstdP96iC8++2pVsNW2xg12XwRYIh/+yQlmXu0n2azUUEavYw==","signatures":[{"sig":"MEUCIGHnvf1JEfyPWo9MAY1PUT6+HAJsKxj/t5Nk7F2zMvoJAiEAu9fW1dLZumYMPRA30TwYxdj7fmY03mBFIgAPStd8xZY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35600},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"aace80dee2d66d5c1469dc0a88ad24cdc51ca4dc","scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","coverage":"vitest run --coverage","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest","lint-staged":"lint-staged","postinstall":"pnpm run bundle","prepublishOnly":"pnpm run test && pnpm run build"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"repository":{"url":"git+https://github.com/deer-develop/return-fetch.git","type":"git"},"_npmVersion":"9.6.7","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"20.3.1","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.2.3_1690623313289_0.5691282547508392","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"return-fetch","version":"0.3.0","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.3.0","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","bugs":{"url":"https://github.com/deer-develop/return-fetch/issues"},"dist":{"shasum":"24b4b2aedeb15dcba315eb6eb18ab574f27bbd0d","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.3.0.tgz","fileCount":11,"integrity":"sha512-BFNSpBc6fTMzgpDDagLjQnrlYOyotKY1UiDs+JZJkKM/kjY0AXgkszoO6ltgTuX0+vC6zJfDctxHpm0ii2fkLA==","signatures":[{"sig":"MEYCIQDIF8uJ46PORsRm10CaAA8zg3CnV8w9NfbFHGzQLvj+QAIhAJTQvTaHKEpdlLopmURCyrAzyM8DhRVrAEh9l3XgdQUp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46772},"main":"dist/index.cjs","type":"module","_from":"file:return-fetch-0.3.0.tgz","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","coverage":"vitest run --coverage","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest","lint-staged":"lint-staged","postinstall":"pnpm run bundle && pnpm run typedoc"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"_resolved":"/tmp/60cfbfdc0172de100d3bc3d757ec215f/return-fetch-0.3.0.tgz","_integrity":"sha512-BFNSpBc6fTMzgpDDagLjQnrlYOyotKY1UiDs+JZJkKM/kjY0AXgkszoO6ltgTuX0+vC6zJfDctxHpm0ii2fkLA==","repository":{"url":"git+https://github.com/deer-develop/return-fetch.git","type":"git"},"_npmVersion":"9.6.7","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"18.17.0","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","typedoc":"^0.24.8","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.3.0_1690716821388_0.7305864513759306","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"return-fetch","version":"0.4.0","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.4.0","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","bugs":{"url":"https://github.com/deer-develop/return-fetch/issues"},"dist":{"shasum":"16f363b41c3b619b275468d146f8ba5913a8bcd1","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.4.0.tgz","fileCount":11,"integrity":"sha512-2IR9sKCOI2bTVBPQlNt+qWvxlmNU6GLTnGGzZdxTXWuN16XJYWrAavrvaE86IAL1Nq4tdT2LNLdkqSo+xBSUqw==","signatures":[{"sig":"MEQCIDvYpnetalMtHgvQaNDZB8L6MWVQWazvvTtoNOGTvBf8AiBkE1PK0vHkMu1Aul9YlgSzBdBH2sxkS+DqrcX4QNIgiA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":59578},"main":"dist/index.cjs","type":"module","_from":"file:return-fetch-0.4.0.tgz","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","coverage":"vitest run --coverage","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest","lint-staged":"lint-staged","postinstall":"pnpm run bundle && pnpm run typedoc"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"_resolved":"/tmp/29cf9b8f2f15ed5036a55d6490432bb4/return-fetch-0.4.0.tgz","_integrity":"sha512-2IR9sKCOI2bTVBPQlNt+qWvxlmNU6GLTnGGzZdxTXWuN16XJYWrAavrvaE86IAL1Nq4tdT2LNLdkqSo+xBSUqw==","repository":{"url":"git+https://github.com/deer-develop/return-fetch.git","type":"git"},"_npmVersion":"9.6.7","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"18.17.0","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","typedoc":"^0.24.8","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.4.0_1690816335988_0.8238149842382878","host":"s3://npm-registry-packages"}},"0.4.1":{"name":"return-fetch","version":"0.4.1","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.4.1","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","bugs":{"url":"https://github.com/deer-develop/return-fetch/issues"},"dist":{"shasum":"fa296ec594c1144f28dd84f43662c3f2ab442a30","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.4.1.tgz","fileCount":11,"integrity":"sha512-hwwj5UJUew7b2jxNPz+XwJUMIfjVgud6CZf5kZCAzL8+g/molQVsJi4rSqaK+fMIlSnsRxXOKsG7bj2mJlznUQ==","signatures":[{"sig":"MEYCIQCJiE3mVSlLulRcTGjnKnhIF/sNHAYrmkcM5zLsXYFfcwIhANu5JMYhHyYrUZRwO34KdQgxaeeL95mRU/34oKdIO0oF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":59524},"main":"dist/index.cjs","type":"module","_from":"file:return-fetch-0.4.1.tgz","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","coverage":"vitest run --coverage","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest","lint-staged":"lint-staged"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"_resolved":"/tmp/9c266e4424320ef10993ef8f374c51eb/return-fetch-0.4.1.tgz","_integrity":"sha512-hwwj5UJUew7b2jxNPz+XwJUMIfjVgud6CZf5kZCAzL8+g/molQVsJi4rSqaK+fMIlSnsRxXOKsG7bj2mJlznUQ==","repository":{"url":"git+https://github.com/deer-develop/return-fetch.git","type":"git"},"_npmVersion":"9.6.7","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"18.17.0","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","typedoc":"^0.24.8","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.4.1_1690816982576_0.30161110935535285","host":"s3://npm-registry-packages"}},"0.4.2":{"name":"return-fetch","version":"0.4.2","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.4.2","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","bugs":{"url":"https://github.com/deer-develop/return-fetch/issues"},"dist":{"shasum":"8e801ad94875c1ebd788fe71b0ba29468f005985","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.4.2.tgz","fileCount":11,"integrity":"sha512-M5vZ7nAURBUSKQdBcsLen34sAbK738oGgXFxeQDxswfauRf+DqFZ/5eCrH/m8IJtvl5CQvJF8MM5Qayg0ShTBA==","signatures":[{"sig":"MEQCIBcBVwZteq1jGJV6En953oK+4H96mnsziVGvmUBdM35+AiAgTZ78cNkHQp4iSRkPtSGtIgM5XHmJH+/4poVFf99fiQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61116},"main":"dist/index.cjs","type":"module","_from":"file:return-fetch-0.4.2.tgz","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","coverage":"vitest run --coverage","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest","lint-staged":"lint-staged"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"_resolved":"/tmp/9ffe246946b66103cb941db1edb456b0/return-fetch-0.4.2.tgz","_integrity":"sha512-M5vZ7nAURBUSKQdBcsLen34sAbK738oGgXFxeQDxswfauRf+DqFZ/5eCrH/m8IJtvl5CQvJF8MM5Qayg0ShTBA==","repository":{"url":"git+https://github.com/deer-develop/return-fetch.git","type":"git"},"_npmVersion":"9.6.7","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"18.17.0","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","typedoc":"^0.24.8","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.4.2_1690824403808_0.33347485732756277","host":"s3://npm-registry-packages"}},"0.4.3":{"name":"return-fetch","version":"0.4.3","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header","nextjs"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.4.3","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","bugs":{"url":"https://github.com/deer-develop/return-fetch/issues"},"dist":{"shasum":"2811f75936c814da4fc0f72d21987165a5903a20","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.4.3.tgz","fileCount":12,"integrity":"sha512-VLdSgOxkXOcSnwAdRwxzJBdmpzhNPtuvLy5rhbfp+iDQo6VGNfyMqwghLZ01dp1aRyJpQKoryMhytb7bfZC89Q==","signatures":[{"sig":"MEYCIQCK70is5zDrNXfupG20MPrP8aJ9bYl4aAjPuGjlX8z9JQIhAL5+Pk+No/aT9+L7jIrEFhcP+9Oxq78juzKbAZ+o2hHD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66002},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"6bd251ec86ef02c12c7a9b996c91f88961ee7cd3","scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run --dir tests","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","coverage":"vitest run --coverage --dir tests","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest --dir tests","lint-staged":"lint-staged","set-version":"sh ./scripts/set-version.sh","prepublishOnly":"pnpm run test && pnpm run build"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"repository":{"url":"git+https://github.com/deer-develop/return-fetch.git","type":"git"},"_npmVersion":"9.6.7","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"20.3.1","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","typedoc":"^0.24.8","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.4.3_1691332342219_0.5442035687700444","host":"s3://npm-registry-packages"}},"0.4.4":{"name":"return-fetch","version":"0.4.4","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header","nextjs"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.4.4","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","bugs":{"url":"https://github.com/deer-develop/return-fetch/issues"},"dist":{"shasum":"70f6a43f0eea9da726985f064d4e4a521281a182","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.4.4.tgz","fileCount":12,"integrity":"sha512-zR6EUO4U/h+8xFHpJ2TdAaGTo79fTGxfq/JWC+yEirTjUrhRg94Agz9qq9Eo49iz1mgSMEc9bRepBlYIiWoYrQ==","signatures":[{"sig":"MEUCIHsBowkwhedNNCxa4/tsHL07pEhfd5+UYDzzFskJzHoZAiEAsg+1R22qx79ZFxVwskioUbgkMhBrq0M6Nzg0LQl7zHQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66002},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"6bd251ec86ef02c12c7a9b996c91f88961ee7cd3","scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run --dir tests","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","coverage":"vitest run --coverage --dir tests","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest --dir tests","lint-staged":"lint-staged","set-version":"sh ./scripts/set-version.sh","prepublishOnly":"pnpm run test && pnpm run build"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"repository":{"url":"git+https://github.com/deer-develop/return-fetch.git","type":"git"},"_npmVersion":"9.6.7","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"20.3.1","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","typedoc":"^0.24.8","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.4.4_1691332449557_0.6407844712863837","host":"s3://npm-registry-packages"}},"0.4.5":{"name":"return-fetch","version":"0.4.5","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header","nextjs"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.4.5","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","bugs":{"url":"https://github.com/deer-develop/return-fetch/issues"},"dist":{"shasum":"f243c34383407687d3693dc5c9582b8fbb0d0618","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.4.5.tgz","fileCount":12,"integrity":"sha512-B4dEbp7cjVuXE0EshS4skHfCdGKYA2U1XDGRCa8EhE6P+R+tAmMtfVskeOI4CAyryD3HNz1esvFGKxOwq4VOhw==","signatures":[{"sig":"MEYCIQCP1ReswTYfqSij9w2e2laPSNbqQglD7KIam2ixtkYGfQIhAKxcfnoF4L5cTKHe0atI7EahtN7+PqHIIU69ezuT1huk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65944},"main":"dist/index.cjs","type":"module","_from":"file:return-fetch-0.4.5.tgz","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run --dir tests","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","coverage":"vitest run --coverage --dir tests","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest --dir tests","lint-staged":"lint-staged","set-version":"sh ./scripts/set-version.sh"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"_resolved":"/private/var/folders/br/srk9g8k903l0k1mqvsksx5t40000gn/T/d3325046950adcdc01b7cd2fb56cd8bb/return-fetch-0.4.5.tgz","_integrity":"sha512-B4dEbp7cjVuXE0EshS4skHfCdGKYA2U1XDGRCa8EhE6P+R+tAmMtfVskeOI4CAyryD3HNz1esvFGKxOwq4VOhw==","repository":{"url":"git+https://github.com/deer-develop/return-fetch.git","type":"git"},"_npmVersion":"9.6.7","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"20.3.1","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","typedoc":"^0.24.8","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.4.5_1691332773981_0.26970384725659735","host":"s3://npm-registry-packages"}},"0.4.6":{"name":"return-fetch","version":"0.4.6","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header","nextjs"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.4.6","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","bugs":{"url":"https://github.com/deer-develop/return-fetch/issues"},"dist":{"shasum":"6e3e6e5f3a7ce6c69dc843b98fa66b7695fb7d77","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.4.6.tgz","fileCount":12,"integrity":"sha512-uI0dmvEnVqX98/+s5VBRguLHofJE1Ot+Yi7DSGljc4pt2tkcfhfSXaom2W78IEnx8lYTjvBWfxh9BTHXF9MigA==","signatures":[{"sig":"MEYCIQCEeIcRMcWU1VsN1C/ozodR+xQgA/pdc8KzICU++jfqdgIhAPtI5HMQzrD6NfqzdQmIWIgdnz0f7iM7lU7SJPtwZp9K","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65583},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"e6260437b6716126e846f35e792da18bba40b71b","scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run --dir tests","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","coverage":"vitest run --coverage --dir tests","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest --dir tests","lint-staged":"lint-staged","set-version":"sh ./scripts/set-version.sh","prepublishOnly":"pnpm run test && pnpm run build"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"repository":{"url":"git+https://github.com/deer-develop/return-fetch.git","type":"git"},"_npmVersion":"10.5.0","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"21.7.3","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","typedoc":"^0.24.8","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.4.6_1716343294583_0.895940949032116","host":"s3://npm-registry-packages"}},"0.4.7":{"name":"return-fetch","version":"0.4.7","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header","nextjs"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.4.7","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","bugs":{"url":"https://github.com/deer-develop/return-fetch/issues"},"dist":{"shasum":"f804ba9c9318e10779c8628aae86f2d3bb543356","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.4.7.tgz","fileCount":12,"integrity":"sha512-hHPd8o+JVhmTE0xds3N0VReoPSa5nfqZEvRgt/rjueZ7F/4u+n3n5HQBNVcj/KIDrHbECHVNaoDn/75iIrVpkQ==","signatures":[{"sig":"MEUCIB6kj01qM67QqZghEA8M888MQreB7sZIRA6mnOMwxCN0AiEAh0Nxa6eVHzjm6IT63Scqmli77VtYXiUv3WBiOD1Mniw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65612},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"2af3e141391d340a0be2f8711ae9946e0633e3de","scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run --dir tests","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","coverage":"vitest run --coverage --dir tests","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest --dir tests","lint-staged":"lint-staged","set-version":"sh ./scripts/set-version.sh","prepublishOnly":"pnpm run test && pnpm run build"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"repository":{"url":"git+https://github.com/deer-develop/return-fetch.git","type":"git"},"_npmVersion":"10.8.2","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","typedoc":"^0.24.8","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.4.7_1737294468239_0.49013481532006975","host":"s3://npm-registry-packages-npm-production"}},"0.4.8":{"name":"return-fetch","version":"0.4.8","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header","nextjs"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.4.8","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","bugs":{"url":"https://github.com/myeongjae-kim/return-fetch/issues"},"dist":{"shasum":"e70e9b12e74fae2e695ea9fcfeac73fed023772c","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.4.8.tgz","fileCount":12,"integrity":"sha512-v4QDtYcpZURU2x9fr+OqurHzuUBhudR+nrFxo8EwOY3nF35kMbE+t8FYtlmfJGfnrBun7dMJ5++VFjXjfwsWGQ==","signatures":[{"sig":"MEQCICOXmUtPiwzxjLtULTNkhYJ8pEkdUHg2J6JMVJLu+7UAAiAHikKiyS3u6tOIHbuYFpTL9kHVf9k/z/PQJdC+PzHFqg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66589},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"044c68cb33fb5e12d75c0734cfde42244de4316e","scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run --dir tests","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","coverage":"vitest run --coverage --dir tests","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest --dir tests","lint-staged":"lint-staged","set-version":"sh ./scripts/set-version.sh","prepublishOnly":"pnpm run test && pnpm run build"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"repository":{"url":"git+https://github.com/myeongjae-kim/return-fetch.git","type":"git"},"_npmVersion":"10.9.2","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"23.7.0","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","typedoc":"^0.24.8","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.4.8_1740122268378_0.015427215789709514","host":"s3://npm-registry-packages-npm-production"}},"0.4.9":{"name":"return-fetch","version":"0.4.9","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header","nextjs"],"author":{"name":"Myeongjae Kim"},"license":"MIT","_id":"return-fetch@0.4.9","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","bugs":{"url":"https://github.com/myeongjae-kim/return-fetch/issues"},"dist":{"shasum":"39e164fc567171a85f9d2a2c1ca375a15e4c4382","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.4.9.tgz","fileCount":12,"integrity":"sha512-cG2fSP8rhESPxeD3Hi6haKGwz+Oq9asypWxmwLjbr5FmZPE5JFxCMP6XTjN3Xb17IlSeHHZThP3RIcwcxDbZ2A==","signatures":[{"sig":"MEYCIQDhW+Z3H+VMpoB6E7OUtunQ7yBXavxBXlztSelsbVWl1wIhAKwVidYF/erFyA1WBoJGEIFt7q872FNCLyfavAD66zj/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67360},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"582e3904d31b803d41e5704a8fe8b0f5aab43ca0","scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run --dir tests","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","coverage":"vitest run --coverage --dir tests","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest --dir tests","lint-staged":"lint-staged","set-version":"sh ./scripts/set-version.sh","prepublishOnly":"pnpm run test && pnpm run build"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"deprecated":"this package has been deprecated","repository":{"url":"git+https://github.com/myeongjae-kim/return-fetch.git","type":"git"},"_npmVersion":"11.12.1","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"24.15.0","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","typedoc":"^0.24.8","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.4.9_1784027286637_0.6692806323081015","host":"s3://npm-registry-packages-npm-production"}},"0.4.10":{"name":"return-fetch","version":"0.4.10","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header","nextjs"],"author":"Myeongjae Kim","license":"MIT","_id":"return-fetch@0.4.10","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","dist":{"shasum":"42909172888c3fa55692b54ac3066160c410620e","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.4.10.tgz","fileCount":12,"integrity":"sha512-GVmqjRL5uGrX1tg1QuYQJMNvzdJybZd6EjkyTkhxl91KxQj6LheqlEWXd49N4jJZVXLanooNMop6a7x5k9SiBw==","signatures":[{"sig":"MEQCIC1Osc0XJKtPTjV8yhqDI7Rf0kiLE5UOCG/ISOrjEhJfAiBShLg3tCK1DvBxvNMSFz7DvoOn/gw3VodrICMp/Z5JqQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67303},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run --dir tests","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","coverage":"vitest run --coverage --dir tests","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest --dir tests","lint-staged":"lint-staged","set-version":"sh ./scripts/set-version.sh"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"deprecated":"this package has been deprecated","repository":{"url":"https://github.com/myeongjae-kim/return-fetch","type":"git"},"description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"24.15.0","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","typedoc":"^0.24.8","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.4.10_1784218339793_0.9872002716542672","host":"s3://npm-registry-packages-npm-production"}},"0.4.11":{"name":"return-fetch","version":"0.4.11","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header","nextjs"],"author":"Myeongjae Kim","license":"MIT","_id":"return-fetch@0.4.11","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","dist":{"shasum":"4e4ecfde531a004ea10d0dd4518f8364a0ffeab9","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.4.11.tgz","fileCount":12,"integrity":"sha512-xW6CdqcD/NXH7sGpmt9IlJzTBuHPAcUELEcIQVJKArhumCqAgTz2ZNOZaXdGPCBX6sUTWJmWBbZnjeyPdzjZbg==","signatures":[{"sig":"MEYCIQCbEugGSt3a0onsFCxFvhrH+7PZQUQcPKCWzO7bHWGKAwIhAJHeRH7mgeFO6M+hDpSEZ6yBTJMX8W9i9hJEg+6/LP5d","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67303},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run --dir tests","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","coverage":"vitest run --coverage --dir tests","prettier":"prettier . --write","preinstall":"npx only-allow pnpm","test:watch":"vitest --dir tests","lint-staged":"lint-staged","set-version":"sh ./scripts/set-version.sh"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"deprecated":"this package has been deprecated","repository":{"url":"https://github.com/myeongjae-kim/return-fetch","type":"git"},"description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"24.15.0","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","typedoc":"^0.24.8","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.4.11_1784218385864_0.4158612590921962","host":"s3://npm-registry-packages-npm-production"}},"0.4.12":{"name":"return-fetch","version":"0.4.12","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header","nextjs"],"author":"Myeongjae Kim","license":"MIT","_id":"return-fetch@0.4.12","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"homepage":"https://return-fetch.myeongjae.kim","dist":{"shasum":"86e16007f2211586f7796678071fc41d3c36eb24","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.4.12.tgz","fileCount":12,"integrity":"sha512-swqVz/Qu8PymtTdwIj0duwu5ITmErKCsJ6BvQRwgKzvRCriV26y2z5JifvsX2Qo/d6Lm0r4Hbd9Z9QeY1dn9+g==","signatures":[{"sig":"MEYCIQCs8M1eBQt/GVbdz1AqKGHCUSOqfJdKHB6RM6+82G36xAIhAPEIJEAdn6yuWtBFqnBY2ZubSatt+mhoYitbEE50/e6H","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67262},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.js","source":"src/index.ts","exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"microbundle watch","lint":"eslint src/**","test":"vitest run --dir tests","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh","check":"tsc --strict --noEmit --extendedDiagnostics","clean":"rimraf dist","setup":"husky install","watch":"pnpm run clean && tsc -w","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","coverage":"vitest run --coverage --dir tests","prettier":"prettier . --write","test:watch":"vitest --dir tests","lint-staged":"lint-staged","set-version":"sh ./scripts/set-version.sh"},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"repository":{"url":"https://github.com/myeongjae-kim/return-fetch","type":"git"},"description":"A very light and simple library to extend fetch by implementing request, response interceptors.","directories":{},"_nodeVersion":"24.15.0","_hasShrinkwrap":false,"devDependencies":{"husky":"^8.0.3","eslint":"^8.45.0","rimraf":"^5.0.1","vitest":"^0.33.0","typedoc":"^0.24.8","prettier":"3.0.0","typescript":"^5.1.6","lint-staged":"^13.2.3","microbundle":"^0.15.1","@vitest/coverage-v8":"^0.33.0","@typescript-eslint/parser":"^6.2.0","prettier-plugin-tailwindcss":"^0.4.1","@typescript-eslint/eslint-plugin":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/return-fetch_0.4.12_1784219136409_0.9161046991053974","host":"s3://npm-registry-packages-npm-production"}},"0.4.13":{"name":"return-fetch","type":"module","version":"0.4.13","description":"A very light and simple library to extend fetch by implementing request, response interceptors.","source":"src/index.ts","exports":{".":{"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"types":"dist/index.d.ts","main":"dist/index.cjs","module":"dist/index.js","unpkg":"dist/index.umd.js","repository":{"type":"git","url":"https://github.com/myeongjae-kim/return-fetch"},"homepage":"https://return-fetch.myeongjae.kim","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header","nextjs"],"author":"Myeongjae Kim","license":"MIT","devDependencies":{"@typescript-eslint/eslint-plugin":"^6.2.0","@typescript-eslint/parser":"^6.2.0","@vitest/coverage-v8":"^0.33.0","eslint":"^8.45.0","husky":"^8.0.3","lint-staged":"^13.2.3","microbundle":"^0.15.1","prettier":"3.0.0","prettier-plugin-tailwindcss":"^0.4.1","rimraf":"^5.0.1","typedoc":"^0.24.8","typescript":"^5.1.6","vitest":"^0.33.0"},"scripts":{"setup":"husky install","clean":"rimraf dist","bundle":"microbundle --format modern,cjs,umd","typedoc":"typedoc src/index.ts --out docs/public/docs","build":"pnpm run clean && pnpm run bundle && sh ./scripts/generate-cts.sh && rimraf dist/index.d.ts\\'\\'","dev":"microbundle watch","watch":"pnpm run clean && tsc -w","test":"vitest run --dir tests","test:watch":"vitest --dir tests","coverage":"vitest run --coverage --dir tests","prettier":"prettier . --write","lint":"eslint src/**","lint-staged":"lint-staged","check":"tsc --strict --noEmit --extendedDiagnostics","set-version":"sh ./scripts/set-version.sh"},"_nodeVersion":"24.15.0","_id":"return-fetch@0.4.13","dist":{"integrity":"sha512-nYnhqe3RBs5gVMMiFT93K9U3+QMZ8F+5Wfv+sg+NZrA1D0WY6q/YObuNe51I9fhX968bq0X0XJI/GA0ylwFHGw==","shasum":"8c05498acd1f48cc5eda719c9dd869b8836160e3","tarball":"https://registry.npmjs.org/return-fetch/-/return-fetch-0.4.13.tgz","fileCount":11,"unpackedSize":64598,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDeLmoFPtcqruSZO20zn6Ezw3JwopT8QB7mPAMCPPbiTQIhAMePxf1vRDJCtV39CojroL9mcIGeVUKCwiqLMYmeObFh"}]},"_npmUser":{"name":"myeongjae.kim","email":"dev@myeongjae.kim"},"directories":{},"maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/return-fetch_0.4.13_1784220319793_0.584241898063331"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-27T14:04:36.420Z","modified":"2026-07-16T16:45:20.107Z","0.1.3":"2023-07-27T14:04:36.689Z","0.2.0":"2023-07-27T14:28:04.305Z","0.2.1":"2023-07-27T17:08:14.519Z","0.2.2":"2023-07-29T08:41:15.372Z","0.2.3":"2023-07-29T09:35:13.484Z","0.3.0":"2023-07-30T11:33:41.535Z","0.4.0":"2023-07-31T15:12:16.156Z","0.4.1":"2023-07-31T15:23:02.788Z","0.4.2":"2023-07-31T17:26:43.984Z","0.4.3":"2023-08-06T14:32:22.388Z","0.4.4":"2023-08-06T14:34:09.744Z","0.4.5":"2023-08-06T14:39:34.187Z","0.4.6":"2024-05-22T02:01:34.734Z","0.4.7":"2025-01-19T13:47:48.402Z","0.4.8":"2025-02-21T07:17:48.541Z","0.4.9":"2026-07-14T11:08:06.783Z","0.4.10":"2026-07-16T16:12:19.940Z","0.4.11":"2026-07-16T16:13:05.999Z","0.4.12":"2026-07-16T16:25:36.548Z","0.4.13":"2026-07-16T16:45:19.939Z"},"author":"Myeongjae Kim","license":"MIT","homepage":"https://return-fetch.myeongjae.kim","keywords":["fetch","interceptor","request","response","baseURL","baseUrl","default headers","header","nextjs"],"repository":{"type":"git","url":"https://github.com/myeongjae-kim/return-fetch"},"description":"A very light and simple library to extend fetch by implementing request, response interceptors.","maintainers":[{"name":"myeongjae.kim","email":"dev@myeongjae.kim"}],"readme":"<h1 align=\"center\">⛓️ return-fetch</h1>\n\n<p align=\"center\">\n  A simple and powerful high order function to extend <code>fetch</code> for baseUrl, default headers, and\ninterceptors. <br/>\n  <a href=\"https://return-fetch.myeongjae.kim\" target=\"_blank\">\n    <strong>See interactive documentation</strong>\n  </a>\n  or\n  <a href=\"https://stackblitz.com/edit/return-fetch\" target=\"_blank\">\n    <strong>demo</strong>.\n  </a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/myeongjae-kim/return-fetch/actions?query=workflow%3ACI\">\n    <img src=\"https://github.com/myeongjae-kim/return-fetch/workflows/CI/badge.svg\" alt=\"CI\" height=\"18\">\n  </a>\n  <a href=\"https://codecov.io/gh/myeongjae-kim/return-fetch\">\n    <img src=\"https://img.shields.io/codecov/c/github/myeongjae-kim/return-fetch.svg\" alt=\"Test Coverage\" height=\"18\">\n  </a>\n  <a href=\"https://www.npmjs.com/package/return-fetch\">\n    <img src=\"https://img.shields.io/npm/v/return-fetch.svg\" alt=\"npm version\" height=\"18\">\n  </a>\n  <a href=\"https://bundlephobia.com/package/return-fetch\">\n    <img src=\"https://img.shields.io/bundlephobia/minzip/return-fetch\" alt=\"Bundle Size\" height=\"18\">\n  </a>\n  <a href=\"https://raw.githubusercontent.com/myeongjae-kim/return-fetch/main/LICENSE\">\n    <img src=\"https://img.shields.io/npm/l/return-fetch.svg\" alt=\"MIT license\" height=\"18\">\n  </a>\n</p>\n\n```ts\nimport returnFetch from \"return-fetch\";\n\nconst fetchExtended = returnFetch({\n  baseUrl: \"https://jsonplaceholder.typicode.com\",\n  headers: {Accept: \"application/json\"},\n  interceptors: {\n    request: async (args) => {\n      console.log(\"********* before sending request *********\");\n      console.log(\"url:\", args[0].toString());\n      console.log(\"requestInit:\", args[1], \"\\n\\n\");\n      return args;\n    },\n\n    response: async (requestArgs, response) => {\n      console.log(\"********* after receiving response *********\");\n      console.log(\"url:\", requestArgs[0].toString());\n      console.log(\"requestInit:\", requestArgs[1], \"\\n\\n\");\n      return response;\n    },\n  },\n});\n\nfetchExtended(\"/todos/1\", {method: \"GET\"})\n  .then((it) => it.text())\n  .then(console.log);\n```\n\n**Output**\n\n```\n********* before sending request *********\nurl: https://jsonplaceholder.typicode.com/todos/1\nrequestInit: { method: 'GET', headers: { Accept: 'application/json' } } \n\n\n********* after receiving response *********\nurl: https://jsonplaceholder.typicode.com/todos/1\nrequestInit: { method: 'GET', headers: { Accept: 'application/json' } } \n\n\n{\n  \"userId\": 1,\n  \"id\": 1,\n  \"title\": \"delectus aut autem\",\n  \"completed\": false\n}\n```\n\n## Background\n\nThe [Next.js framework](https://nextjs.org/)(which I love so much) [v13 App Router](https://nextjs.org/docs/app) uses\n[its own `fetch` implementation that extends `node-fetch`](https://nextjs.org/docs/app/api-reference/functions/fetch) to\ndo server side things like caching. I was accustomed to using [Axios](https://github.com/axios/axios) for API calls, but\nI have felt that now is the time to replace Axios with `fetch` finally. The most disappointing aspect I found when\ntrying to replace Axios with `fetch` was that `fetch` does not have any interceptors. I thought surely someone\nmust have implemented it, so I searched for libraries. However, there was no library capable of handling various\nsituations, only one that could add a single request and response interceptors to the global `fetch`. That is the\nreason why I decided to implement it myself.\n\n### Philosophy\n\nIn implementing the `fetch` interceptors, I considered the following points:\n\n1. **Minimalistic.** I decided to only implement the following additional functions and not others:\n    1. Implementing request and response interceptors\n    2. Specifying a baseUrl\n    3. Setting a default header\n2. **No peer dependencies**. I decided not to use any other libraries. I would like to keep the library\n   as light as possible and running on any execution environments which have `fetch` (e.g. Node.js, Web Browsers, React\n   Native, Web Workers).\n3. It should be **easy to add interceptors** because `return-fetch` will provide minimal functionality. Users should be\n   able to extend fetch as they wish.\n4. Codes to add interceptors should be reusable and able to maintain the **Single Responsibility Principle (SRP)**,\n   and it should be possible to combine interceptors that adhere to the SRP.\n5. **Liskov Substitution Principle (LSP)** should be maintained. The `fetch` function created by `return-fetch` should\n   be able to replace the standard `fetch` function anywhere without any problems.\n\n### Good Things\n\n- Superlight bundle size < 1KB.\n- No peer dependencies.\n- No side effects. Pure functional.\n- No classes. Just a function.\n- Recursive type definition to chain functions infinitely.\n- Any execution environment having fetch, possible for any `fetch` polyfills.\n- 100% TypeScript.\n- 100% test coverage.\n\n## Installation\n\n### Package Manager\n\nVia npm\n\n```bash\nnpm install return-fetch\n```\n\nVia yarn\n\n```bash\nyarn add return-fetch\n```\n\nVia pnpm\n\n```bash\npnpm add return-fetch\n```\n\n### \\<script\\> tag\n\n```html\n<!--\n  Pick your favourite CDN:\n    - https://unpkg.com/return-fetch\n    - https://cdn.jsdelivr.net/npm/return-fetch\n    - https://www.skypack.dev/view/return-fetch\n    - …\n-->\n\n<!-- UMD import as window.returnFetch -->\n<script src=\"https://unpkg.com/return-fetch\"></script>\n\n<!-- Modern import -->\n<script type=\"module\">\n    import returnFetch from 'https://cdn.skypack.dev/return-fetch/dist/index.js'\n\n    // ... //\n</script>\n```\n\n## Demo\n\nRun on <a href=\"https://stackblitz.com/edit/return-fetch\" target=\"_blank\">Stickblitz</a>.\n\n## Types\n\nhttps://return-fetch.myeongjae.kim/docs/types/ReturnFetchDefaultOptions.html\n\n## Usage\n\n### #1. Display/Hide loading indicator\n\n```ts\nimport returnFetch, { ReturnFetch } from \"return-fetch\";\nimport { displayLoadingIndicator, hideLoadingIndicator } from \"@/your/adorable/loading/indicator\";\n\n// Write your own high order function to display/hide loading indicator\nconst returnFetchWithLoadingIndicator: ReturnFetch = (args) => returnFetch({\n  ...args,\n  interceptors: {\n    request: async (args) => {\n      setLoading(true);\n      return args;\n    },\n    response: async (requestArgs, response) => {\n      setLoading(false);\n      return response;\n    },\n  },\n})\n\n// Create an extended fetch function and use it instead of the global fetch.\nexport const fetchExtended = returnFetchWithLoadingIndicator({\n  // default options\n});\n\n//////////////////// Use it somewhere ////////////////////\nfetchExtended(\"/sample/api\");\n```\n\n### #2. Throw an error if a response status is greater than or equal to 400\n\n```ts\nimport returnFetch, { ReturnFetch } from \"return-fetch\";\n\n// Write your own high order function to throw an error if a response status is greater than or equal to 400.\nconst returnFetchThrowingErrorByStatusCode: ReturnFetch = (args) => returnFetch({\n  ...args,\n  interceptors: {\n    response: async (_, response) => {\n      if (response.status >= 400) {\n        throw await response.text().then(Error);\n      }\n\n      return response;\n    },\n  },\n})\n\n// Create an extended fetch function and use it instead of the global fetch.\nexport const fetchExtended = returnFetchThrowingErrorByStatusCode({\n  // default options\n});\n\n//////////////////// Use it somewhere ////////////////////\nfetchExtended(\"/sample/api/400\").catch((e) => alert(e.message));\n```\n\n### #3. Serialize request body and deserialize response body\n\nYou can import below example code because it is published as a separated npm package:\n[return-fetch-json](https://www.npmjs.com/package/return-fetch-json)\n\n```ts\nimport returnFetch, { FetchArgs, ReturnFetchDefaultOptions } from \"return-fetch\";\n\n// Use as a replacer of `RequestInit`\ntype JsonRequestInit = Omit<NonNullable<FetchArgs[1]>, \"body\"> & { body?: object };\n\n// Use as a replacer of `Response`\nexport type ResponseGenericBody<T> = Omit<\n  Awaited<ReturnType<typeof fetch>>,\n  keyof Body | \"clone\"\n> & {\n  body: T;\n};\n\nexport type JsonResponse<T> = T extends object\n  ? ResponseGenericBody<T>\n  : ResponseGenericBody<string>;\n\n\n// this resembles the default behavior of axios json parser\n// https://github.com/axios/axios/blob/21a5ad34c4a5956d81d338059ac0dd34a19ed094/lib/defaults/index.js#L25\nconst parseJsonSafely = (text: string): object | string => {\n  try {\n    return JSON.parse(text);\n  } catch (e) {\n    if ((e as Error).name !== \"SyntaxError\") {\n      throw e;\n    }\n\n    return text.trim();\n  }\n};\n\n// Write your own high order function to serialize request body and deserialize response body.\nexport const returnFetchJson = (args?: ReturnFetchDefaultOptions) => {\n  const fetch = returnFetch(args);\n\n  return async <T>(\n    url: FetchArgs[0],\n    init?: JsonRequestInit,\n  ): Promise<JsonResponse<T>> => {\n    const response = await fetch(url, {\n      ...init,\n      body: init?.body && JSON.stringify(init.body),\n    });\n\n    const body = parseJsonSafely(await response.text()) as T;\n\n    return {\n      headers: response.headers,\n      ok: response.ok,\n      redirected: response.redirected,\n      status: response.status,\n      statusText: response.statusText,\n      type: response.type,\n      url: response.url,\n      body,\n    } as JsonResponse<T>;\n  };\n};\n\n// Create an extended fetch function and use it instead of the global fetch.\nexport const fetchExtended = returnFetchJson({\n  // default options\n});\n\n//////////////////// Use it somewhere ////////////////////\nexport type ApiResponse<T> = {\n  status: number;\n  statusText: string;\n  data: T;\n};\n\nfetchExtended<ApiResponse<{ message: string }>>(\"/sample/api/echo\", {\n  method: \"POST\",\n  body: {message: \"Hello, world!\"}, // body should be an object.\n}).then(it => it.body);\n```\n\n### #4. Compose above three high order functions to create your awesome fetch 🥳\n\nBecause of the recursive type definition, you can chain extended returnFetch functions as many as you want. It allows\nyou to write extending functions which are responsible only for a single feature. It is a good practice to stick to\n**the Single Responsibility Principle** and writing a reusable function to write clean code.\n\n```ts\nimport {\n  returnFetchJson,\n  returnFetchThrowingErrorByStatusCode,\n  returnFetchWithLoadingIndicator\n} from \"@/your/customized/return-fetch\";\n\n/*\n  Compose high order functions to create your awesome fetch.\n   1. Add loading indicator.\n   2. Throw an error when a response's status code is equal to 400 or greater.\n   3. Serialize request body and deserialize response body as json and return it.\n*/\nexport const fetchExtended = returnFetchJson({\n  fetch: returnFetchThrowingErrorByStatusCode({\n    fetch: returnFetchWithLoadingIndicator({\n      // default options\n    }),\n  }),\n});\n\n//////////////////// Use it somewhere ////////////////////\nfetchExtended(\"/sample/api/echo\", {\n  method: \"POST\",\n  body: {message: \"this is an object of `ApiResponse['data']`\"}, // body should be an object.\n}).catch((e) => alert(e.message));\n```\n\n### #5. Use any `fetch` implementation\n\n`fetch` has been added since [Node.js v17.5 as an experimental feature](https://nodejs.org/tr/blog/release/v17.5.0),\nalso available from [Node.js v16.15](https://nodejs.org/tr/blog/release/v16.15.0) and\n[still experimental(29 JUL 2023, v20.5.0)](https://nodejs.org/docs/v20.5.0/api/globals.html#fetch). You can use\n'[node-fetch](https://github.com/node-fetch/node-fetch)' as a polyfill for Node.js v16.15 or lower,\nor '[whatwg-fetch](https://github.com/JakeChampion/fetch)' for old web browsers, or\n'[cross-fetch](https://github.com/lquixada/cross-fetch)' for both web browser and Node.js.\n\nNext.js has already included 'node-fetch' and\n[they extend it for server-side things like caching](https://nextjs.org/docs/app/api-reference/functions/fetch).\n\nWhatever a `fetch` you use, you can use `return-fetch` as long as the `fetch` you use is compatible with the\n[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).\n\n#### #5-1. `node-fetch`\n\nI implemented a simple proxy for https://postman-echo.com with `node-fetch` as an example using\n[Next.js route handler](https://nextjs.org/docs/app/building-your-application/routing/router-handlers).\n\n```ts\n// src/app/sample/api/proxy/postman-echo/node-fetch/[[...path]]/route.ts\nimport { NextRequest } from \"next/server\";\nimport nodeFetch from \"node-fetch\";\nimport returnFetch, { ReturnFetchDefaultOptions } from \"return-fetch\";\n\nprocess.env[\"NODE_TLS_REJECT_UNAUTHORIZED\"] = \"0\"; // to turn off SSL certificate verification on server side\nconst pathPrefix = \"/sample/api/proxy/postman-echo/node-fetch\";\n\nexport async function GET(request: NextRequest) {\n  const {nextUrl, method, headers} = request;\n\n  const fetch = returnFetch({\n    // Use node-fetch instead of global fetch\n    fetch: nodeFetch as ReturnFetchDefaultOptions[\"fetch\"],\n    baseUrl: \"https://postman-echo.com\",\n  });\n\n  const response = await fetch(nextUrl.pathname.replace(pathPrefix, \"\"), {\n    method,\n    headers,\n  });\n\n  return new Response(response.body, {\n    status: response.status,\n    statusText: response.statusText,\n    headers: response.headers,\n  });\n}\n```\n\nSend a request to the proxy route.\n\n```ts\nimport {\n  returnFetchJson,\n  returnFetchThrowingErrorByStatusCode,\n  returnFetchWithLoadingIndicator\n} from \"@/your/customized/return-fetch\";\n\nexport const fetchExtended = returnFetchJson({\n  fetch: returnFetchThrowingErrorByStatusCode({\n    fetch: returnFetchWithLoadingIndicator({\n      baseUrl: \"https://return-fetch.myeongjae.kim\",\n    }),\n  }),\n});\n\n//////////////////// Use it somewhere ////////////////////\nfetchExtended(\n  \"/sample/api/proxy/postman-echo/node-fetch/get\",\n  {\n    headers: {\n      \"X-My-Custom-Header\": \"Hello World!\"\n    }\n  },\n);\n```\n\n#### #5-2. `whatwg-fetch`\n\n`whatwg-fetch` is a polyfill for browsers. I am going to send a request using `whatwg-fetch` to the proxy route.\n\n```ts\nimport {\n  returnFetchJson,\n  returnFetchThrowingErrorByStatusCode,\n  returnFetchWithLoadingIndicator\n} from \"@/your/customized/return-fetch\";\nimport { fetch as whatwgFetch } from \"whatwg-fetch\";\n\nexport const fetchExtended = returnFetchJson({\n  fetch: returnFetchThrowingErrorByStatusCode({\n    fetch: returnFetchWithLoadingIndicator({\n      fetch: whatwgFetch, // use whatwgFetch instead of browser's global fetch\n      baseUrl: \"https://return-fetch.myeongjae.kim\",\n    }),\n  }),\n});\n\n//////////////////// Use it somewhere ////////////////////\nfetchExtended(\n  \"/sample/api/proxy/postman-echo/node-fetch/get\",\n  {\n    headers: {\n      \"X-My-Custom-Header\": \"Hello World!\"\n    }\n  },\n);\n```\n\n#### #5-3. `cross-fetch`\n\nI implemented a simple proxy for https://postman-echo.com with `cross-fetch` as an example using\n[Next.js route handler](https://nextjs.org/docs/app/building-your-application/routing/router-handlers).\n\n```ts\n// src/app/sample/api/proxy/postman-echo/cross-fetch/[[...path]]/route.ts\nimport { NextRequest } from \"next/server\";\nimport crossFetch from \"cross-fetch\";\nimport returnFetch from \"return-fetch\";\n\nprocess.env[\"NODE_TLS_REJECT_UNAUTHORIZED\"] = \"0\"; // to turn off SSL certificate verification on server side\nconst pathPrefix = \"/sample/api/proxy/postman-echo/cross-fetch\";\n\nexport async function GET(request: NextRequest) {\n  const {nextUrl, method, headers} = request;\n\n  const fetch = returnFetch({\n    fetch: crossFetch, // Use cross-fetch instead of built-in Next.js fetch\n    baseUrl: \"https://postman-echo.com\",\n  });\n\n  const response = await fetch(nextUrl.pathname.replace(pathPrefix, \"\"), {\n    method,\n    headers,\n  });\n\n  return new Response(response.body, {\n    status: response.status,\n    statusText: response.statusText,\n    headers: response.headers,\n  });\n}\n```\n\nSend a request to the proxy route using `cross-fetch` on the client-side also.\n\n```ts\nimport {\n  returnFetchJson,\n  returnFetchThrowingErrorByStatusCode,\n  returnFetchWithLoadingIndicator\n} from \"@/your/customized/return-fetch\";\nimport crossFetch from \"cross-fetch\";\n\nexport const fetchExtended = returnFetchJson({\n  fetch: returnFetchThrowingErrorByStatusCode({\n    fetch: returnFetchWithLoadingIndicator({\n      fetch: crossFetch, // Use cross-fetch instead of browser's global fetch\n      baseUrl: \"https://return-fetch.myeongjae.kim\",\n    }),\n  }),\n});\n\n//////////////////// Use it somewhere ////////////////////\nfetchExtended(\n  \"/sample/api/proxy/postman-echo/node-fetch/get\",\n  {\n    headers: {\n      \"X-My-Custom-Header\": \"Hello World!\"\n    }\n  },\n);\n```\n\n#### #5-4. Next.js built-in `fetch`\n\nI implemented a simple proxy for https://postman-echo.com with Next.js built-in `fetch` as an example using\n[Next.js route handler](https://nextjs.org/docs/app/building-your-application/routing/router-handlers).\n\n```ts\n// src/app/sample/api/proxy/postman-echo/nextjs-fetch/[[...path]]/route.ts\nimport { NextRequest } from \"next/server\";\nimport returnFetch from \"return-fetch\";\n\nprocess.env[\"NODE_TLS_REJECT_UNAUTHORIZED\"] = \"0\"; // to turn off SSL certificate verification on server side\nconst pathPrefix = \"/sample/api/proxy/postman-echo/nextjs-fetch\";\n\nexport async function GET(request: NextRequest) {\n  const {nextUrl, method, headers} = request;\n\n  const fetch = returnFetch({\n    // omit fetch option to use Next.js built-in fetch\n    baseUrl: \"https://postman-echo.com\",\n  });\n\n  const response = await fetch(nextUrl.pathname.replace(pathPrefix, \"\"), {\n    method,\n    headers,\n  });\n\n  return new Response(response.body, {\n    status: response.status,\n    statusText: response.statusText,\n    headers: response.headers,\n  });\n}\n```\n\nSend a request to the proxy route using web browser default `fetch`.\n\n```ts\nimport {\n  returnFetchJson,\n  returnFetchThrowingErrorByStatusCode,\n  returnFetchWithLoadingIndicator\n} from \"@/your/customized/return-fetch\";\n\nexport const fetchExtended = returnFetchJson({\n  fetch: returnFetchThrowingErrorByStatusCode({\n    fetch: returnFetchWithLoadingIndicator({\n      baseUrl: \"https://return-fetch.myeongjae.kim\",\n    }),\n  }),\n});\n\n//////////////////// Use it somewhere ////////////////////\nfetchExtended(\n  \"/sample/api/proxy/postman-echo/nextjs-fetch/get\",\n  {\n    headers: {\n      \"X-My-Custom-Header\": \"Hello World!\"\n    }\n  },\n);\n```\n\n#### #5-5. React Native\n\n(I have not written a documents for React Native yet, but it surely works with React Native becuase it does not have\nany dependencies on a specific `fetch` implementation.)\n\n### #6. Replace default `fetch` with your customized `returnFetch`\n\n```ts\nimport {\n  returnFetchJson,\n  returnFetchThrowingErrorByStatusCode,\n  returnFetchWithLoadingIndicator\n} from \"@/your/customized/return-fetch\";\n\n// save global fetch reference.\nconst globalFetch = fetch;\nexport const fetchExtended = returnFetchThrowingErrorByStatusCode({\n  fetch: returnFetchWithLoadingIndicator({\n    fetch: globalFetch, // use global fetch as a base.\n  }),\n});\n\n// replace global fetch with your customized fetch.\nwindow.fetch = fetchExtended;\n\n//////////////////// Use it somewhere ////////////////////\nfetch(\"/sample/api/echo\", {\n  method: \"POST\",\n  body: JSON.stringify({message: \"Hello, world!\"})\n}).catch((e) => alert(e.message));\n```\n\n### #7. Use `URL` or `Request` object as a first argument of `fetch`\n\nThe type of a first argument of `fetch` is `Request | string | URL` and a second argument is\n`RequestInit | undefined`. Through above examples, we used a string as a first argument of `fetch`.\n`return-fetch` is also able to handle a `Request` or `URL` object as a first argument. It does not restrict\nany features of `fetch`.\n\n**Be careful! the default options' baseURL does not applied to a `URL` or `Request` object.** Default headers are\nstill applied to a `Request` object as you expected.\n\n#### #7-1. `URL` object as a first argument\n\nEven a `baseUrl` is set to 'https://google.com', it is not applied to a `URL` object. An `URL` object cannot be\ncreated if an argument does not have origin. You should set a full `URL` to a `URL` object, so a `baseUrl` will\nbe ignored.\n\n```ts\nimport returnFetch from \"return-fetch\";\n\nconst fetchExtended = returnFetch({\n  baseUrl: \"https://google.com\",\n  headers: {\n    \"Content-Type\": \"application/json\",\n    \"Accept\": \"application/json\",\n    \"X-My-Header\": \"Hello, world!\",\n  },\n});\n\nfetchExtended(\n  /*\n    Even a baseURL is set to 'https://google.com', it is not applied to a URL object.\n    An URL object cannot be created if an argument does not have origin.\n    You should set a full URL to a URL object, so a baseURL will be ignored.\n  */\n  new Request(new URL(\"https://return-fetch.myeongjae.kim/sample/api/proxy/postman-echo/nextjs-fetch/post\"), {\n    method: \"PUT\",\n    body: JSON.stringify({message: \"overwritten by requestInit\"}),\n    headers: {\n      \"X-My-Headers-In-Request-Object\": \"Works well!\",\n    },\n  }),\n  {\n    method: \"POST\",\n    body: JSON.stringify({message: \"Hello, world!\"}),\n  },\n)\n  .then((it) => it.json())\n  .then(console.log);\n```\n\n#### #7-2. `Request` object as a first argument\n\nEven a `baseUrl` is set to 'https://google.com', it is not applied to a `Request` object. While creating a\n`Request` object, an origin is set to 'https://return-fetch.myeongjae.kim', which is the origin of this page,\nso `baseUrl` will be ignored.\n\nOn Node.js, a `Request` object cannot be created without an origin, same as `URL` object.\n\n```ts\nimport returnFetch from \"return-fetch\";\n\nconst fetchExtended = returnFetch({\n  baseUrl: \"https://google.com\",\n  headers: {\n    \"Content-Type\": \"application/json\",\n    \"Accept\": \"application/json\",\n    \"X-My-Header\": \"Hello, world!\",\n  },\n});\n\nfetchExtended(\n  /*\n    Even a baseURL is set to 'https://google.com', it is not applied to a Request object.\n    While creating a Request object, an origin is set to 'https://return-fetch.myeongjae.kim',\n    which is the origin of this page, so baseURL will be ignored.\n  */\n  new Request(\"/sample/api/proxy/postman-echo/node-fetch/post\", {\n    method: \"PUT\",\n    body: JSON.stringify({message: \"overwritten by requestInit\"}),\n    headers: {\n      \"X-My-Headers-In-Request-Object\": \"Works well!\",\n    },\n  }),\n  {\n    method: \"POST\",\n    body: JSON.stringify({message: \"Hello, world!\"}),\n  },\n)\n  .then((it) => it.json())\n  .then(console.log);\n```\n\n### #8. Retry a request\n\nInterceptors are async functions. You can make an async call in interceptors. This example shows how to retry a request\nwhen a response status is 401.\n\n```ts\nlet retryCount = 0;\n\nconst returnFetchRetry: ReturnFetch = (args) => returnFetch({\n  ...args,\n  interceptors: {\n    response: async (response, requestArgs, fetch) => {\n      if (response.status !== 401) {\n        return response;\n      }\n\n      console.log(\"not authorized, trying to get refresh cookie..\");\n      const responseToRefreshCookie = await fetch(\n        \"https://httpstat.us/200\",\n      );\n      if (responseToRefreshCookie.status !== 200) {\n        throw Error(\"failed to refresh cookie\");\n      }\n\n      retryCount += 1;\n      console.log(`(#${retryCount}) succeeded to refresh cookie and retry request`);\n      return fetch(...requestArgs);\n    },\n  },\n});\n\nconst fetchExtended = returnFetchRetry({\n  baseUrl: \"https://httpstat.us\",\n});\n\nfetchExtended(\"/401\")\n  .then((it) => it.text())\n  .then((it) => `Response body: \"${it}\"`)\n  .then(console.log)\n  .then(() => console.log(\"\\n Total counts of request: \" + (retryCount + 1)))\n```\n\n#### #8-1. Doubling retry counts\n\nIf you nest `returnFetchRetry`, you can retry a request more than once. When you nest 4 times, you can retry a\nrequest 16 times (I know it is too much, but isn't it fun?).\n\n```ts\nlet retryCount = 0;\n\n// create a fetch function with baseUrl applied\nconst fetchBaseUrlApplied = returnFetch({baseUrl: \"https://httpstat.us\"});\n\nconst returnFetchRetry: ReturnFetch = (args) => returnFetch({\n  ...args,\n  // use fetchBaseUrlApplied as a default fetch function\n  fetch: args?.fetch ?? fetchBaseUrlApplied,\n  interceptors: {\n    response: async (response, requestArgs, fetch) => {\n      if (response.status !== 401) {\n        return response;\n      }\n\n      console.log(\"not authorized, trying to get refresh cookie..\");\n      const responseToRefreshCookie = await fetch(\"/200\");\n      if (responseToRefreshCookie.status !== 200) {\n        throw Error(\"failed to refresh cookie\");\n      }\n\n      retryCount += 1;\n      console.log(`(#${retryCount}) succeeded to refresh cookie and retry request`);\n      return fetch(...requestArgs);\n    },\n  },\n});\n\nconst nest = (\n  remaining: number,\n  providedFetch = fetchBaseUrlApplied,\n): ReturnType<ReturnFetch> =>\n  remaining > 0\n    ? nest(remaining - 1, returnFetchRetry({fetch: providedFetch}))\n    : providedFetch;\n\n// nest 4 times -> 2^4 = 16\nconst fetchExtended = nest(4);\n\nfetchExtended(\"/401\")\n  .then((it) => it.text())\n  .then((it) => `Response body: \"${it}\"`)\n  .then(console.log)\n  .then(() => console.log(\"\\n Total counts of request: \" + (retryCount + 1)))\n```\n\n## Derived Packages\n\n- [return-fetch-json](https://www.npmjs.com/package/return-fetch-json): A package that serialize request body object\n  and deserialize response body as a JSON object.\n\n## License\n\nMIT © [Myeongjae Kim](https://myeongjae.kim)\n","readmeFilename":""}