10 karma · joined August 2, 2025
const client = createClient({ timeout: 5000, retries: 3, circuit: { threshold: 5, reset: 30000 } }) const response = await client('/api/data') // exactly like fetch()
Drop-in replacement, zero deps, ~2KB. Has lifecycle hooks for auth/logging, exponential backoff with jitter, respects Retry-After headers, and proper AbortSignal composition. Preserves all native fetch behavior.
https://github.com/gkoos/ffetch
Thoughts?
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).
2. Low tolerance for LLM-induced errors: - Network protocols / telecom software - Medical software - Aerospace, automotive
3. Performance-critical code: - Game engine / graphics engine development (probably an area where we'll see them soon) - Kernels, drivers, microcontrollers.
etc. Not all is lost yet.
- Chatbots, copilots, search assistants. - Image/audio/video tools that make sense to non-technical users. - Data visualization for AI outputs. - etc.
These can keep you in your comfort zone while you integrate AI.
The point is, I don't think one app, any app can solve all mankind's all scheduling problems.