{"library":"return-fetch","type":"library","category":null,"description":"return-fetch v0.4.8 is a lightweight TypeScript library (under 1KB gzipped) that wraps the native fetch API to provide request/response interceptors, base URL prefixing, and default headers. It is designed as a higher-order function, returning an enhanced fetch function with the same interface, making it ideal for Next.js App Router (which uses a patched fetch) and isomorphic usage. Unlike Axios or ky, it does not introduce new APIs or create custom adapters; instead, it composes naturally with existing fetch patterns. The library is ESM-first with CommonJS fallback, ships TypeScript definitions, and is actively maintained with regular releases.","language":"javascript","status":"active","version":"0.4.8","tags":["javascript","fetch","interceptor","request","response","baseURL","baseUrl","default headers","header","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install return-fetch","imports":["import returnFetch from 'return-fetch'","import returnFetch, { type ReturnFetchDefaultOptions } from 'return-fetch'","const returnFetch = require('return-fetch').default"]},{"cmd":"yarn add return-fetch","imports":[]},{"cmd":"pnpm add return-fetch","imports":[]}],"homepage":"https://return-fetch.myeongjae.kim","github":"https://github.com/myeongjae-kim/return-fetch","docs":null,"changelog":null,"pypi":null,"npm":"return-fetch","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}