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

@gomani/adaptive

v0.4.0

Published

Network-adaptive rendering as a first-class reactive primitive — responsive design for the network.

Downloads

174

Readme

@gomani/adaptive

Network-adaptive rendering as a first-class reactive primitive for Gomaniresponsive design for the network, not the viewport.

Network quality is just another signal (P4). A component declares a full path and a lean path, and the framework selects: on the server (zero JS) from the request's Save-Data header and the persistent data-saver cookie; on the client from the Network Information API or a measured sampler. The user always holds an overriding data-saver control that trumps inference.

Authoring

import { Adaptive, tier } from '@gomani/adaptive';

<Adaptive
  full={<HeroWithArtwork />} // capable connections
  lite={<HeroTextOnly />} // constrained / data-saver
/>;

// Or map the quality to anything:
const cols = tier((q) => (q.tier === 'lite' ? 1 : 3));

Only the chosen variant is rendered to HTML, so the other costs nothing. Placed in a static region it is server-decided (zero JS); placed inside an island it re-evaluates against the client signal.

How the tier is decided

Defensive by construction — any single "constrained" signal drops to lite, and the user's override wins. The default is full (the rich path) with a drop to lite only on evidence of constraint, because the two most common browsers expose no Network Information API.

| Priority | Signal | Result | | -------- | --------------------------------------------- | ------ | | 1 | Data-saver override (on / off) | forces | | 2 | Save-Data: on | lite | | 3 | effectiveType ∈ {slow-2g, 2g, 3g} | lite | | 4 | measured downlink < 1.5 Mbps, or RTT > 500 ms | lite | | 5 | (default) | full |

The data-saver control

// Client-only APIs live at the `/client` subpath, so the main entry stays server-safe (no DOM).
import { setDataSaver, initClientQuality } from '@gomani/adaptive/client';

setDataSaver('on'); // persist + reload → the server serves lean everywhere
initClientQuality(); // opt-in: detect + keep the signal current + persist the tier for the server

setDataSaver writes a cookie the server reads, so the choice persists across requests and drives the zero-JS server decision. initClientQuality runs the measured sampler and persists the detected tier for the next request — progressive refinement without blocking the first paint.

License

MIT © Venancio Gomani / Kwacha Kulture.