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

owofetch-core

v1.0.0

Published

Smart Fetch Library by OwO System

Readme

🦉 owofetch-core

Smart, ultra-lightweight, and professional HTTP fetch wrapper that saves you dozens of lines of boilerplate code. Get auto-retry, TTL cache, request deduplication, and timeout guard out-of-the-box in a single elegant line of code! 🚀

npm version license


⚡ How does OwO Fetch simplify your code? (The Ultimate Comparison)

Instead of writing dozens of lines of redundant code to handle network hiccups, timeouts, in-memory caching, and concurrent request deduplication in every part of your app...

❌ The Old Way (Native Fetch) - Over 40 Lines of Boilerplate!

If you want a safe fetch call with a Timeout guard, automatic Retry on network blips, in-memory Caching, and concurrent request Deduplication (coalescing):

const cache = new Map();
const pending = new Map();

async function fetchUser(userId) {
  const url = `https://jsonplaceholder.typicode.com/posts/${userId}`;
  
  if (cache.has(url)) return cache.get(url);
  if (pending.has(url)) return pending.get(url);

  const promise = (async () => {
    let retries = 2;
    while (retries >= 0) {
      const controller = new AbortController();
      const timer = setTimeout(() => controller.abort(), 8000);
      try {
        const res = await fetch(url, { signal: controller.signal });
        clearTimeout(timer);
        if (!res.ok) throw new Error("HTTP Error");
        const data = await res.json();
        cache.set(url, data);
        return data;
      } catch (err) {
        clearTimeout(timer);
        if (retries === 0) throw err;
        retries--;
      }
    }
  })();

  pending.set(url, promise);
  try {
    return await promise;
  } finally {
    pending.delete(url);
  }
}

✔ The OwO Fetch Way - A Single Elegant Line of Code!

All the complex logic, error handling, abort controllers, retries, and map states are handled internally and compressed into one clean, robust line:

import owo from "owofetch-core";

// One line of code handles caching, deduplication, timeout, and retry automatically!
const user = await owo.get("https://jsonplaceholder.typicode.com/posts/1");

🚀 Outstanding Out-of-the-Box Features

  • 🔄 Automatic Retries (Auto-Retry): If the network blips momentarily, the library automatically retries behind the scenes, keeping your UX smooth and error-free.
  • ⏱️ Timeout Guard: Slow or hanging connections are aborted automatically using a built-in AbortController to prevent memory leaks and sluggish performance.
  • 💾 Smart TTL Memory Cache: Duplicate requests fetch data instantly from the local cache, saving bandwidth and optimizing client performance.
  • 🔗 Request Deduplication (Promise Coalescing): If multiple components query the exact same endpoint simultaneously, only one network request is sent. The response promise is shared among all callers, boosting performance by up to 300%.

💻 Installation

Install the package via npm:

npm install owofetch-core

💡 Usage & API Guide

1. Retrieve Data (GET)

By default, GET requests activate caching and request deduplication automatically:

import owo from "owofetch-core";

const posts = await owo.get("https://jsonplaceholder.typicode.com/posts");
console.log(posts);

2. Send Data (POST)

Send request payloads effortlessly with automatic headers configuration (e.g., application/json is added by default):

import owo from "owofetch-core";

const newPost = await owo.post("https://jsonplaceholder.typicode.com/posts", {
  title: "OwO Fetch Core Rocks!",
  body: "Simplifying HTTP requests like a charm.",
  userId: 1
});

console.log("Response:", newPost);

3. Custom Configurations

Customize parameters per-request or update the default configurations seamlessly:

// Override defaults for a specific request
const customData = await owo.get("https://jsonplaceholder.typicode.com/posts/1", {
  timeout: 3000,   // Abort after 3 seconds instead of 8
  retries: 5       // Retry 5 times instead of 2
});

4. Debug & Trace Mode

Enable console debugging to see exactly what happens behind the scenes in real-time:

import owo from "owofetch-core";

// Enable logger
owo.enableDebug();

// Your console or terminal will now display detailed cache hits and request events!
const res1 = await owo.get("https://jsonplaceholder.typicode.com/posts/1");
const res2 = await owo.get("https://jsonplaceholder.typicode.com/posts/1"); // Triggers console: [OwO] CACHE HIT

📄 License

MIT Open Source License — provided with love by OwO System 🦉.