@lacspace/api is a tiny axios/ky alternative built on the platform `fetch`. You get typed requests, predictable errors, automatic retries with backoff, interceptors, query params, in-flight de-duping, response caching and cursor pagination — with zero dependencies, running on Node, browsers, edge and React Native.
| Feature | @lacspace/api | axios |
|---|---|---|
| Dependencies | Zero (built on fetch) | Bundles its own |
| Runs on edge / RN / browser / Node | Yes | Mostly (adapters vary) |
| Interceptors | ·Yes | Yes |
| Automatic retries + backoff | Built in | Via plugin |
| In-flight de-duping | Built in | No |
| Response caching | Built in | No |
| Cursor pagination helper | Yes | No |
| TypeScript-first | ·Yes | Yes (types shipped) |
| Licence | ·Lacspace Free Licence (MIT-equivalent) | MIT |
axios is the industry default and a safe choice everywhere. Pick @lacspace/api when you want the same conveniences with zero dependencies, first-class edge/React-Native support, and retries/dedup/caching built in.
Yes. It wraps the platform fetch, which is why it has zero dependencies and runs anywhere fetch does — Node 18+, browsers, edge runtimes and React Native.
Yes — request/response interceptors, plus retries with backoff, de-duping and response caching that axios needs plugins for.