Tiny fetch API wrapper (ESM) adding retry with exponential backoff, configurable timeout, and custom retry strategies. Current stable version 2.3.1, lightweight (~3KB gzipped), zero runtime dependencies. Supports both browser and Node.js (fetch-compatible). Differentiators: minimal overhead, terse API, and full TypeScript definitions (since v2).
npm install tenacious-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows a basic GET request with 3 retries, 1s delay, and 5s timeout using the default export.
Use import syntax; if using CommonJS, use dynamic import via async function or update package.json to include 'type': 'module'.
Calculate per-attempt timeout manually if needed, or use a custom retry strategy.
Replace `retryMethod` with `retryStrategy` returning true/false.
Install a fetch polyfill like `node-fetch` or `cross-fetch` and assign to globalThis before using.
Add `"type": "module"` to your package.json, or rename file to .mjs, or use dynamic import.
Use `import tenaciousFetch from 'tenacious-fetch'` (default import) instead of `import { tenaciousFetch } from 'tenacious-fetch'`.Install and import a fetch polyfill before using tenacious-fetch, e.g., `import 'node-fetch'` or `import 'cross-fetch/polyfill'`.
No dependency data recorded yet.