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

helix-fetch

v1.1.1

Published

A lightweight, framework-independent TypeScript library designed for efficient front-end data fetching and caching. By creating an instance, it provides query and mutation function with all essential properties. And inside the instance you can provide bas

Readme

What is helix-fetch

A lightweight, framework-independent TypeScript library designed for efficient front-end data fetching and caching.

How to use

npm i helix-fetch
import { HelixFetch } from helix-fetch;

i) Now create an instance.

const myFetch = new HelixFetch({
    baseUrl = "https://jsonplaceholder.typicode.com",

    setToken(){
        // get your token from anywhere
        const token = localStorage.getItem("auth")
        if(token) return token; // will set to headers, "Authorization": token
        return null
    }

// The both baseUrl and setToken function are optional.
})

And, this instance provides you two major method. One is query and another is mutation.

ii) Take a look for query.

✨ Option 1: For query.

const fun = async() => {
    const result = await myFetch.query("/users") // above, we alredy set the base url.
    console.log(result) // take a look what you get!
}
// Now all the data is cached. If the function get call again, it will return cached data.😍


// In this case, behind the seen - it autometically set headers
{
    'content-type': 'application/json',
    'Authorization': token
}

✨ Option 2: For query.

const fun = async () => {
    const result = await myFetch.query("/posts", {
        headers: {
            'Content-Type': 'application/json',
            "auth": "aopz-pz-tf-zljyla-avrlu.",
            "key": "value"
        }
    })
    console.log(result)
}

// In this case, you are setting your custom headers.

iii) Now see, how to do mutation.

✨ Option 1: For mutation.

const fun = async () => {
    const payload = {
        "name": "John Doe",
        "age": 25,
        "value": "key"
    }
    const result = await myFetch.mutation({
        method: 'POST',
        url: "/post",
        body: payload,
    })
    console.log(result)
}

✨ Option 2: For mutation.

// This one is just for include your custom headers.

const fun = async () => {
    const payload = {
        "name": "John Doe",
        "age": 25,
        "value": "key"
    }
    const result = await myFetch.mutation({
        method: 'POST',
        url: "/post",
        body: payload,
        headers: {
                'Content-Type': 'application/json'
                "autho": "i am a autho"
            }
    })
    console.log(result)
}

That's all. This three stpes can make your data fetching very easy and clean.