npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hyper-fetch/core

v8.2.0

Published

Cache, Queue and Persist your requests no matter if you are online or offline!

Readme

⚡ Hyper Fetch

📖 About

HyperFetch Core is the foundation of the HyperFetch ecosystem. Every API call is a typed, immutable request object with built-in caching, queuing, retries, and offline support. It works in any JavaScript environment — browser, server, or edge — and connects to any API through pluggable adapters.

🎯 Key Capabilities

  • 🔮 Zero guesswork — Full autocompletion for every request, response, param, and error. Never cast to any again
  • 📡 One interface for everything — REST, GraphQL, Firebase, WebSockets, SSE — switch APIs without rewriting a line
  • 💾 Stop re-fetching what you already have — Smart cache with TTL and invalidation out of the box
  • 🔁 Failed requests retry themselves — Configurable retry with backoff so users never see random failures
  • 📴 Works without internet — Queues requests offline and replays them when connection returns
  • 🚫 No duplicate requests — Concurrent identical calls are deduplicated automatically
  • ⏱️ Know exactly what's happening — Upload and download progress with time estimates for every request
  • 🎯 Cancel anything, anytime — Kill pending requests individually or by group with one call
  • 🔌 Swap engines without touching your code — Switch between Axios, GraphQL, Firebase adapters in one line
  • 🪄 Generate your SDK — Point CLI at an OpenAPI schema and get a fully typed client instantly

🚀 Quick Start

npm install @hyper-fetch/core
import { createClient } from "@hyper-fetch/core";

// Single entry point — all requests inherit this base URL
const client = createClient({ url: "https://api.example.com" });

// Define a request with typed response — :userId becomes a required param
const getUser = client.createRequest<{ response: { id: number; name: string } }>()({
  endpoint: "/users/:userId",
  method: "GET",
});

// setParams is typed from the endpoint string, send() returns typed data
const { data, error } = await getUser.setParams({ userId: 1 }).send();

📚 Documentation

💡 Examples

Typed requests with params, payload, and query params

interface User {
  id: number;
  name: string;
  email: string;
}

// GET request — only response type needed, params inferred from :userId
const getUser = client.createRequest<{ response: User }>()({
  endpoint: "/users/:userId",
  method: "GET",
});

// POST request — define both response and payload types
const createUser = client.createRequest<{
  response: User;
  payload: { name: string; email: string };
}>()({
  endpoint: "/users",
  method: "POST",
});

// Params are type-checked: { userId: number } required here
const { data } = await getUser.setParams({ userId: 1 }).send();

// Payload is type-checked: { name, email } required here
const { data: newUser } = await createUser.send({
  data: { name: "Jane", email: "[email protected]" },
});

Dynamic data with query params

// Define allowed query params — all are optional and type-checked
const listUsers = client.createRequest<{
  response: User[];
  queryParams: { page?: number; limit?: number; search?: string };
}>()({
  endpoint: "/users",
  method: "GET",
});

// Query params are appended to the URL: /users?page=1&limit=20&search=john
const { data } = await listUsers
  .setQueryParams({ page: 1, limit: 20, search: "john" })
  .send();

Lifecycle callbacks

// Hook into the request lifecycle — track progress, log events, handle responses
const { data } = await getUser.setParams({ userId: 1 }).send({
  onStart: ({ requestId }) => console.log(`Request ${requestId} started`),
  onResponse: ({ response }) => console.log("Got data:", response.data),
  onUploadProgress: ({ progress }) => console.log(`Upload: ${progress}%`),
  onDownloadProgress: ({ progress }) => console.log(`Download: ${progress}%`),
});

Response mapping

// Transform the response before it reaches your code
const getUser = client
  .createRequest<{ response: User }>()({
    endpoint: "/users/:userId",
    method: "GET",
  })
  .setResponseMapper((response) => ({
    ...response,
    data: { ...response.data, name: response.data.name.toUpperCase() },
  }));

License

MIT