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

fx-fetch

v1.1.2

Published

Simple, immutable, clonable, and effect-based HTTP fetching.

Readme

Fx-Fetch = Fetch × EffectTS

Simple, immutable, clonable, and effect-based HTTP fetching.

Introduction

A production-ready solution for safe & simple HTTP fetching built with EffectTS. Designed with great developer experience in mind. Works everywhere! Even in Firefox 🦊.

  • Production-ready — Used in production by Ematiq since February 2025
  • Immutable & Clonable — Follows functional programming principles
  • Safe by default — Prevents common pitfalls with HTTP fetching
  • Cross-platform — Works in all modern browsers, Bun, Deno, and Node.js
  • Effect-based — Seamless integration with the Effect ecosystem
  • Testable — Easy mocking and testing with service-based architecture
  • Dual API — Familiar syntax from EffectTS
  • Simple — It is just fetch! No more complex concepts to learn.

Documentation

📚 See our rich documentation site. It's worth it!

Installation

npm i fx-fetch # or pnpm, bun, deno

Quick Example

import { Effect, Schema } from "effect";
import { Fetch, Request } from "fx-fetch";

class User extends Schema.Class<User>("User")({
  id: Schema.Int,
  firstName: Schema.String,
  lastName: Schema.String,
}) {}

const getUser = Effect.fn(function* (id: number) {
  const request = Request.unsafeMake({ url: `https://dummyjson.com/users/${id}` });
  const payload = yield* Fetch.fetchJsonWithSchema(request, User);

  // User ╶─┐
  //        ▼
  return payload;
});

Comparison with Other Solutions

| Solution | Immutable | Clonable | Effect-based | Production-ready | | ------------------------------------------------------------------------------------------------------------------- | :-------: | :------: | :----------: | :--------------: | | window.fetch | ❌ | ❌¹ | ❌ | ✅ | | @effect/platform Http API | ✅ | ✅ | ✅ | ❌² | | fx-fetch | ✅ | ✅ | ✅ | ✅ |


  1. globalThis.Request and globalThis.Response are not truly clonable. Why?
  2. Marked as unstable in the official documentation. Some method implementations are still missing.

FAQ

Is it really production-ready?

Yes! We (Ematiq) have been using it in production since early February 2025.

Why are immutability and clonability important?

EffectTS is built on functional programming principles. All building blocks are immutable and clonable by design. For a library to truly be in symbiosis with EffectTS, it must adhere to the same principles.

Working with immutable objects can be challenging without proper tools — that's why we built fx-fetch.

EffectTS excels at parallel actions and concurrent fibers. Without relying on immutable and clonable structures, you may encounter unexpected issues.

Real-world examples:

  • Reusing the same Request for paginated API calls
  • Appending general headers to already-created Request objects
  • Retrying failed requests without worrying about side effects

Why aren't Request.clone() and Response.clone() enough?

[!CAUTION] First, they don't work properly in some browsers (looking at you, Firefox 🦊).

Even when they work correctly, they don't solve DX issues or provide key features like reading request/response properties multiple times without side effects.

const req = new globalThis.Request("url", {
  method: "POST",
  body: "Hello World", // ← String
});

// ReadableStream can only be read once. You must know what you're reading.
console.log(req.body); // → `ReadableStream { }`

Sponsorship

OG Sponsor

The fx-fetch library was originally designed for TypeScript colleagues at Ematiq. Thanks to them for testing and feedback on early versions!