ky: Stop Writing Fetch Boilerplate
Originally published at recca0120.github.io
Every project using fetch ends up with the same boilerplate: if (!response.ok) throw new Error(...).
Add retry and you're writing a loop. Add timeout and you're pulling out AbortController.
ky wraps all of ...
recca0120.hashnode.dev6 min read