@fveracoechea/fetchtastic@1.1.0
latest
fveracoechea/fetchtasticSmall wrapper around fetch designed to perform more predictable and type-safe network requests, with zero dependencies.
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
70%
Published
9 months ago (1.1.0)
🌩️ Fetchtastic
Small wrapper around fetch designed to perform more predictable and type-safe network requests, with zero dependencies.
✨ | Features | |
---|---|---|
🪶 | Lightweight | Less than 3kB gzipped |
🧩 | Composable | Safely reuse previous configurations |
😀 | Intuitive | Clean and easy to use API |
🛡️ | Type safe | Strongly typed, written in TypeScript |
🛠️ | Isomorphic | Compatible with modern browsers , Node.js and Deno |
✅ | Well Tested | Covered by unit tests |
📖 Documentation
Visit fveracoechea.github.io/fetchtastic to view the full documentation.
⚡Getting Started
npm install fetchtastic
Fetchtastic is built on standard web APIs and runs everywhere fetch is available.
- Modern browsers
- Node.js >= v18
- Deno
- Service Workers
- Netlify Edge Functions
- Vercel Edge Functions
- and more...
Basic usage
const api = fetchtastic('https://jsonplaceholder.typicode.com') .setOptions({ cache: 'default', mode: 'cors' }) .appendHeader('Content-Type', 'application/json'); const blogPosts = await api .get('/posts') .setSearchParams({ page: 1, per_page: 12 }) .json(); await api.url('/albums').post({ title: 'My New Album' }).resolve();
🕹️ Contributing
Contributions are welcome and highly appreciated. However, before you jump right into it, we would like you to review our Contribution Guidelines to make sure you have a smooth experience.
Add Package
deno add jsr:@fveracoechea/fetchtastic
Import symbol
import * as fetchtastic from "@fveracoechea/fetchtastic";
Import directly with a jsr specifier
import * as fetchtastic from "jsr:@fveracoechea/fetchtastic";
Add Package
pnpm i jsr:@fveracoechea/fetchtastic
pnpm dlx jsr add @fveracoechea/fetchtastic
Import symbol
import * as fetchtastic from "@fveracoechea/fetchtastic";
Add Package
yarn add jsr:@fveracoechea/fetchtastic
yarn dlx jsr add @fveracoechea/fetchtastic
Import symbol
import * as fetchtastic from "@fveracoechea/fetchtastic";
Add Package
npx jsr add @fveracoechea/fetchtastic
Import symbol
import * as fetchtastic from "@fveracoechea/fetchtastic";
Add Package
bunx jsr add @fveracoechea/fetchtastic
Import symbol
import * as fetchtastic from "@fveracoechea/fetchtastic";