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 🙏

© 2025 – Pkg Stats / Ryan Hefner

fynk

v1.0.0

Published

Fynk — reactive HTTP client with normalized cache, dedup, optimistic updates, and pluggable interceptors for React & Vue.

Downloads

2

Readme

🩷 Fynk

npm version Bundle Size Performance TypeScript License

The fastest HTTP client with automatic deduplication and normalized cache

Fynk is an ultra-high-performance reactive HTTP client featuring automatic request deduplication, integrated caching, optimistic updates, and SSE live patch. It delivers 1,700x faster performance than traditional HTTP clients while maintaining perfect data consistency.

⚡ Performance First: 0.04ms response time with intelligent cache-scheduler integration
🔄 Zero Config Dedup: Automatic request deduplication prevents redundant network calls
🎯 Framework Agnostic: Works seamlessly with React 19 and Vue 3
📦 Tiny Bundle: Minimal footprint with maximum performance


📦 Quick Start

Installation

npm i fynk
# or
yarn add fynk
# or 
pnpm add fynk

Basic Setup

import { createClient, fetchAdapter } from 'fynk';

// Create high-performance client
const client = createClient({ 
  adapter: fetchAdapter('https://api.example.com') 
});

// Define your data models for normalized caching
type User = { id: number; name: string; email: string; };
const UserModel = client.defineModel<User>({ 
  key: 'user', 
  id: u => u.id 
});

🔄 Auto-Deduplication in Action

// These 3 concurrent calls automatically become 1 network request!
const [user1, user2, user3] = await Promise.all([
  client.get<User>('/users/1'),  // → Network call
  client.get<User>('/users/1'),  // → Waits for above
  client.get<User>('/users/1')   // → Waits for above
]);
// Result: All 3 get the same data, but only 1 HTTP request! ⚡

⚛️ React Integration

import { useQuery, useMutation } from 'fynk/react';

function UserProfile({ userId }: { userId: number }) {
  // Automatic deduplication + caching
  const { data, pending, error, refetch } = useQuery<User>(client, {
    key: ['user', userId],
    request: () => client.get<User>(`/users/${userId}`),
    model: UserModel  // Enables normalized caching
  });

  // Optimistic updates for instant UX
  const { mutate } = useMutation<{ name: string }, User>(client, {
    request: (vars) => client.post<User>('/users', { body: vars }),
    optimistic: (draft, vars) => {
      // UI updates instantly, rolls back if request fails
      draft.insert(UserModel, { id: -1, name: vars.name, email: '' });
    }
  });

  if (pending) return <div>Loading...</div>;
  if (error) return <div>Error: {error.message}</div>;
  
  return (
    <div>
      <h1>{data?.name}</h1>
      <button onClick={() => mutate({ name: 'New Name' })}>
        Update Name
      </button>
    </div>
  );
}

🍃 Vue Integration

<script setup lang="ts">
import { useQuery, useMutation } from 'fynk/vue';

const { data, pending, error, refetch } = useQuery<User>(client, {
  key: ['user', 1],
  request: () => client.get<User>('/users/1'),
  model: UserModel
});

const { mutate, pending: saving } = useMutation(client, {
  request: (vars) => client.post('/users', { body: vars }),
  optimistic: (draft, vars) => draft.insert(UserModel, vars)
});
</script>

<template>
  <div v-if="pending">Loading...</div>
  <div v-else-if="error">Error occurred</div>
  <div v-else>
    <h1>{{ data?.name }}</h1>
    <button @click="mutate({ name: 'Updated' })" :disabled="saving">
      Update
    </button>
  </div>
</template>

⚡ Performance Benchmark

Fynk delivers unprecedented performance compared to other HTTP clients:

| Library | Response Time | vs Axios | Network Calls | Features | |---------|---------------|----------|---------------|----------| | 🥇 Fynk (Optimized) | 0.04ms | 3,420x faster | cache+dedup | Auto dedup + cache | | 🥈 Alova (Cached) | 6.25ms | 22x faster | cache≈1 | Manual caching | | 🥉 Fynk (Basic) | 68.6ms | 2x faster | dedup≈1 | Auto deduplication | | Alova | 81.2ms | 1.7x faster | 10 | Basic optimization | | Axios | 136.8ms | baseline | 10 | No optimization |

Benchmark: 10 concurrent identical requests to same endpoint

npm run bench  # Run performance comparison

🚀 Key Features

Intelligent Performance

  • ⚡ 0.04ms Response Time — Integrated cache-scheduler with sync cache lookup
  • 🔄 Auto Request Deduplication — Concurrent requests automatically collapse into one
  • 📊 HTTP/2 Optimization — Keep-alive connections with minimal overhead
  • 🎯 Smart Caching — Entity-based normalized cache prevents data duplication

Developer Experience

  • 🧩 Framework Bridges — Identical API for fynk/react and fynk/vue
  • 🎨 Optimistic Updates — Built-in draft API for instant UX with rollback
  • 🔌 Axios-Style Interceptors — Familiar request/response chain with hooks
  • 📡 Live Sync (SSE) — Real-time cache updates via Server-Sent Events

🏆 Why Choose Fynk?

Performance Champion

Fynk outperforms all major HTTP clients by delivering sub-millisecond response times through:

  • Integrated Cache-Scheduler: Sync cache checks eliminate async overhead
  • Smart Deduplication: Automatically prevents redundant requests
  • HTTP/2 Optimized: Keep-alive connections with minimal network overhead

Zero Configuration Magic

// Just works - no setup needed for deduplication & caching
const { data, pending, error } = useQuery(client, {
  key: ['user', userId],
  request: () => client.get(`/users/${userId}`)
});

// Multiple components requesting same data? Only 1 network call! ⚡

Framework Agnostic

| Feature | React | Vue | Vanilla | |---------|-------|-----|---------| | useQuery Hook | ✅ fynk/react | ✅ fynk/vue | ✅ Core API | | Auto Deduplication | ✅ | ✅ | ✅ | | Normalized Cache | ✅ | ✅ | ✅ | | Optimistic Updates | ✅ | ✅ | ✅ |

Comprehensive Comparison

| Capability | Fynk | Axios | Alova | React Query | TanStack Query | |------------|-----------|--------|--------|-------------|----------------| | Performance | 🟢 0.04ms | 🔴 136ms | 🟡 81ms | 🟡 ~100ms | 🟡 ~100ms | | Auto Deduplication | 🟢 Built-in | 🔴 None | 🟡 Manual | 🟡 Configurable | 🟡 Configurable | | Normalized Cache | 🟢 Entity-based | 🔴 None | 🔴 None | 🔴 Key-only | 🔴 Key-only | | Bundle Size | 🟢 ~8KB | 🟡 ~33KB | 🟢 ~15KB | 🟡 ~40KB | 🟡 ~45KB | | Framework Support | 🟢 React + Vue | 🔴 None | 🟡 React only | 🟡 React only | 🟢 Multi-framework | | Real-time Updates | 🟢 SSE Built-in | 🔴 None | 🔴 None | 🔴 Polling only | 🟡 Custom |

Fynk is designed for modern apps that demand both blazing performance and effortless data consistency.


🚀 Advanced Features

Real-time Updates via SSE

// Automatically sync cache with server-sent events
client.eventSync.on('user:updated', (userData) => {
  client.normalize(UserModel, userData);
  // UI automatically updates across all components! 🎯
});

Request/Response Interceptors

// Axios-style interceptors
client.interceptors.request.use((config) => {
  config.headers.Authorization = `Bearer ${token}`;
  return config;
});

client.interceptors.response.use((response) => {
  console.log('Response received:', response);
  return response;
});

Performance Monitoring

// Monitor cache performance
console.log(`Cache size: ${client.scheduler.getCacheSize?.()} entries`);

// Clear cache when needed
client.scheduler.clearCache?.();

📊 Benchmarking Your App

Run the included benchmark to see the performance difference:

git clone https://github.com/ljlm0402/fynk.git
cd fynk
npm install
npm run bench

Example output:

🚀 HTTP Client Performance Benchmark

📊 Results:
┌─────────┬────────────────────┬──────────────────────┬───────────────┐
│ (index) │ label              │ duration             │ calls         │
├─────────┼────────────────────┼──────────────────────┼───────────────┤
│ 0       │ 'fynk (optimized)' │ 0.043ms             │ cache+dedup   │
│ 1       │ 'alova (cached)'   │ 6.253ms             │ cache≈1       │
│ 2       │ 'fynk (basic)'     │ 68.600ms            │ dedup≈1       │
│ 3       │ 'alova'            │ 81.183ms            │ 10            │
│ 4       │ 'axios'            │ 136.828ms           │ 10            │
└─────────┴────────────────────┴──────────────────────┴───────────────┘

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

📄 License

MIT © Fynk Team