A lightweight, production-ready drop-in replacement for native fetch

1 gkoos 1 8/16/2025, 8:29:08 AM npmjs.com ↗

Comments (1)

gkoos · 1h ago
In every JS/TS project, be it frontend or backend, you usually have to fetch some data. And when you go into production, you realise you need something more resilient than the native fetch.

There are some libraries on npm, but I found them either too dumb or doing too much, so I built my own.

- Timeouts - per-request or global - Retries - user-defined, defaults to exponential back-off + jitter - Circuit breaker - trip after N failures - Hooks - logging, auth, metrics, request/response transformation - Per-request overrides - customize behavior on a per-request basis - Universal - Node, Browser, Cloudflare Workers, React Native - Zero runtime deps - ships as dual ESM/CJS - Written in TypeScript

Any feedback is welcome, here or in the github repo (https://github.com/gkoos/ffetch).