Login One

@lacspace/api vs axios

@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.

npm i @lacspace/api
Read the docs
Feature@lacspace/apiaxios
DependenciesZero (built on fetch)Bundles its own
Runs on edge / RN / browser / NodeYesMostly (adapters vary)
Interceptors·YesYes
Automatic retries + backoffBuilt inVia plugin
In-flight de-dupingBuilt inNo
Response cachingBuilt inNo
Cursor pagination helperYesNo
TypeScript-first·YesYes (types shipped)
Licence·Lacspace Free LicenceMIT

The honest verdict

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.

Frequently asked

Is @lacspace/api built on fetch?

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.

Does it have interceptors like axios?

Yes — request/response interceptors, plus retries with backoff, de-duping and response caching that axios needs plugins for.

More comparisons