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

fluxion-js

v1.0.0

Published

One API to control all data. A full data orchestration engine that replaces Axios, React Query, SWR, and basic API SDKs.

Readme

Fluxion

"One API to control all data."

Fluxion is a full data orchestration engine that replaces Axios, React Query, SWR, and basic API SDKs with a single, unified API.

Features

  • Zero-Config Defaults - Works out of the box, no configuration required
  • HTTP Client - Full-featured replacement for Axios with interceptors, retry logic, and timeout support
  • Request Deduplication - Automatically prevents duplicate requests
  • Query Management - Powerful caching, deduplication, and automatic refetching (React Query/SWR alternative)
  • Mutations - Optimistic updates and automatic cache invalidation
  • Infinite Queries - Cursor-based and offset-based pagination made easy
  • Plugin Ecosystem - Extensible with built-in plugins for logging, auth, rate limiting
  • TypeScript First - Full type safety out of the box
  • Cross-Platform - Works in Browser, Node.js, and Edge environments

Installation

npm install fluxion

Quick Start

Zero-Config Usage

import { createClient } from 'fluxion';

// Works immediately without configuration
const client = createClient();
const response = await client.get('https://api.example.com/users');

HTTP Client with Options

import { createClient } from 'fluxion';

const client = createClient({
  baseURL: 'https://api.example.com',
  timeout: 5000,
  retry: 3,
  headers: {
    'Authorization': 'Bearer token',
  },
});

const response = await client.get('/users');
const users = await client.post('/users', { name: 'John' });

With React

import { FluxionProvider, useQuery, useMutation } from 'fluxion';
import { createClient } from 'fluxion';

const client = createClient({ baseURL: '/api' });

function App() {
  return (
    <FluxionProvider config={{ client }}>
      <UserList />
    </FluxionProvider>
  );
}

function UserList() {
  const { data, isLoading, refetch } = useQuery({
    queryKey: 'users',
    queryFn: () => client.get('/users').then(r => r.data),
  });

  if (isLoading) return <div>Loading...</div>;
  
  return (
    <div>
      {data?.map(user => <div key={user.id}>{user.name}</div>)}
      <button onClick={refetch}>Refresh</button>
    </div>
  );
}

function CreateUser() {
  const { mutate } = useMutation({
    mutationFn: (data) => client.post('/users', data).then(r => r.data),
    onSuccess: () => {
      // Cache automatically invalidated
    },
  });

  return <button onClick={() => mutate({ name: 'New User' })}>Add User</button>;
}

Infinite Queries (Pagination)

const { data, fetchNextPage, hasNextPage } = useInfiniteQuery({
  queryKey: ['posts'],
  queryFn: ({ pageParam = 0 }) => 
    client.get(`/posts?page=${pageParam}`).then(r => r.data),
  getNextPageParam: (lastPage) => lastPage.nextPage ?? undefined,
});

Using Plugins

import { createClient, loggingPlugin, authPlugin, rateLimitPlugin } from 'fluxion';

const client = createClient({ baseURL: '/api' });

client.plugins.use(loggingPlugin());
client.plugins.use(authPlugin({ token: 'your-token' }));
client.plugins.use(rateLimitPlugin({ maxRequests: 10, windowMs: 1000 }));

// Custom plugins
client.plugins.use({
  name: 'my-plugin',
  onRequest: (config) => {
    console.log('Request:', config.url);
    return config;
  },
  onResponse: (response) => {
    console.log('Response:', response.status);
    return response;
  },
});

API Reference

Client Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | baseURL | string | - | Base URL for all requests | | timeout | number | - | Request timeout in ms | | headers | Record<string, string> | {} | Default headers | | retry | number | 3 | Retry attempts | | retryDelay | (attempt) => number | exponential | Delay between retries | | deduplicate | boolean | true | Prevent duplicate requests | | fetch | typeof fetch | globalThis.fetch | Custom fetch implementation | | onRequest | (config) => config | - | Request interceptor | | onResponse | (response) => response | - | Response interceptor | | onError | (error) => error | - | Error interceptor |

Query Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | queryKey | string \| string[] \| object | Required | Unique query key | | queryFn | () => Promise<T> | Required | Data fetching function | | enabled | boolean | true | Enable/disable query | | staleTime | number | 0 | Cache duration (ms) | | cacheTime | number | 300000 | GC time | | refetchOnWindowFocus | boolean | true | Refetch on focus | | retry | number \| false | 3 | Retry attempts |

Built-in Plugins

  • loggingPlugin() - Logs requests/responses/errors
  • authPlugin({ token }) - Adds authentication headers
  • rateLimitPlugin({ maxRequests, windowMs }) - Rate limiting

License

MIT