Installation
Installation
Package Manager
Install @shkumbinhsn/fetcher using your preferred package manager:
# npmnpm install @shkumbinhsn/fetcher
# yarnyarn add @shkumbinhsn/fetcher
# pnpmpnpm add @shkumbinhsn/fetcher
# bunbun add @shkumbinhsn/fetcherSchema Library
You’ll also need a Standard Schema compatible validation library. Here are the most popular options:
Zod (Recommended)
npm install zodValibot
npm install valibotArkType
npm install arktypeEffect Schema
npm install @effect/schemaTypeScript Configuration
Ensure your tsconfig.json has strict mode enabled for the best experience:
{ "compilerOptions": { "strict": true, "target": "ES2020", "module": "ESNext", "moduleResolution": "bundler" }}Verify Installation
Create a test file to verify everything works:
import { fetcher } from '@shkumbinhsn/fetcher';
// Basic usage without schemaconst response = await fetcher('https://jsonplaceholder.typicode.com/posts/1');console.log(response);