Minimal Fetch API utility library for Node.js >=20 and browsers. Provides timeout and retry wrappers around the native fetch. Current version 0.1.8, pre-v1 release with infrequent updates. Differentiates by being TypeScript-first, zero-dependency, and supporting both Node.js built-in fetch (no polyfill needed) and browser environments via the same API. No dependency on node-fetch or undici.
npm install fetch-helper-xNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates timeoutFetch and retryFetch with JSON parsing, and the importance of canceling the response body to prevent memory leaks.
Always call `await response.cancelBody()` after processing the response body, or handle the response as a stream.
Use `import` syntax and upgrade Node.js to >=20.
Pin to exact version or be prepared to adapt changes on minor/patch updates.
If you need to fully abort the request, combine with AbortController manually.
import { timeoutFetch } from 'fetch-helper-x'Use `import('fetch-helper-x')` dynamic import or switch to ESM syntax.Upgrade Node to >=20 or use a fetch polyfill like undici.
No dependency data recorded yet.