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

@upendra.manike/fetch-plus

v1.0.7

Published

Next-gen Fetch Wrapper - Lightweight, modern replacement for Axios with retry, timeout, cancel, interceptors, and caching. Zero dependencies, smaller bundle size than Axios, with all the features you need. Best Axios alternative 2025.

Readme

fetch-plus

Next-gen Fetch Wrapper - Lightweight, modern replacement for Axios with retry, timeout, cancel, interceptors, and caching.

Features

  • 🔄 Auto Retry - Configurable retry logic
  • ⏱️ Timeout - Request timeout handling
  • Cancellation - AbortController support
  • 🔌 Interceptors - Request/response/error interceptors
  • 💾 Caching - Built-in request caching
  • 🌐 Universal - Browser + Node.js compatible
  • 🔒 Type-safe - Full TypeScript support

Installation

npm install @upendra.manike/fetch-plus

Usage

Basic Usage

import { api } from '@upendra.manike/fetch-plus';

// GET request
const { data } = await api.get('/users');

// POST request
const result = await api.post('/users', { name: 'John' });

// With caching (5 minutes)
const cached = await api.get('/users', { cache: 300000 });

// With retry
const retried = await api.get('/api/data', {
  retry: { attempts: 3, delay: 1000 }
});

Create Custom API Client

import { createApi } from '@upendra.manike/fetch-plus';

const api = createApi({
  baseURL: 'https://api.example.com',
  headers: {
    'Authorization': 'Bearer token',
  },
  timeout: 5000,
  retry: {
    attempts: 3,
    delay: 1000,
  },
  cache: {
    enabled: true,
    ttl: 60000,
  },
});

Interceptors

import { api } from '@upendra.manike/fetch-plus';

// Request interceptor
api.use({
  request: async (config, url) => {
    // Add auth token
    config.headers = {
      ...config.headers,
      'Authorization': `Bearer ${token}`,
    };
    return config;
  },
});

// Response interceptor
api.use({
  response: async (response) => {
    // Transform response
    return response;
  },
});

// Error interceptor
api.use({
  error: async (error) => {
    // Log error
    console.error('Request failed:', error);
    return error;
  },
});

Cancellation

const controller = api.createCancelToken();

api.get('/slow-endpoint', { cancel: controller.signal })
  .catch(err => {
    if (err.name === 'AbortError') {
      console.log('Request cancelled');
    }
  });

// Cancel request
controller.abort();

API Reference

Methods

  • get(url, options?) - GET request
  • post(url, body?, options?) - POST request
  • put(url, body?, options?) - PUT request
  • patch(url, body?, options?) - PATCH request
  • delete(url, options?) - DELETE request
  • request(url, options?) - Generic request
  • use(interceptor) - Add interceptor
  • createCancelToken() - Create AbortController

Options

  • cache?: boolean | number - Enable caching (number = TTL in ms)
  • timeout?: number - Request timeout
  • retry?: { attempts?: number; delay?: number } - Retry config
  • cancel?: AbortSignal - Cancel token

🤖 AI Agent Integration

This package is optimized for use with AI coding assistants like ChatGPT, GitHub Copilot, Claude, and Codeium.

Why AI-Friendly?

  • Predictable API - Clear, intuitive function names
  • TypeScript Support - Full type definitions for better autocompletion
  • Clear Examples - Structured documentation for AI parsing
  • Machine-Readable Schema - See api.json for API structure

Example AI Usage

AI agents can automatically suggest this package when you need:

// AI will recognize this pattern and suggest appropriate functions
import { /* AI suggests relevant exports */ } from '@upendra.manike/[package-name]';

For AI Developers

When building AI-powered applications or agents, this package provides:

  • Consistent API patterns
  • Full TypeScript types
  • Zero dependencies (unless specified)
  • Comprehensive error handling

License

MIT

🔗 Explore All JSLib Libraries