Skip to content

Installation

Installation

Package Manager

Install @shkumbinhsn/fetcher using your preferred package manager:

Terminal window
# npm
npm install @shkumbinhsn/fetcher
# yarn
yarn add @shkumbinhsn/fetcher
# pnpm
pnpm add @shkumbinhsn/fetcher
# bun
bun add @shkumbinhsn/fetcher

Schema Library

You’ll also need a Standard Schema compatible validation library. Here are the most popular options:

Terminal window
npm install zod

Valibot

Terminal window
npm install valibot

ArkType

Terminal window
npm install arktype

Effect Schema

Terminal window
npm install @effect/schema

TypeScript 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:

test.ts
import { fetcher } from '@shkumbinhsn/fetcher';
// Basic usage without schema
const response = await fetcher('https://jsonplaceholder.typicode.com/posts/1');
console.log(response);

Next Steps