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

@zedtech/zedkit-live

v0.1.0

Published

A small LiveSource interface plus polling and WebSocket implementations with reconnect and polling backup, with no framework code. Original work by the same author.

Readme

@zedtech/zedkit-live

Framework-free live data sources for the browser and Node 22+: one small LiveSource interface, a pollingSource, and a wsSource that reconnects and can fall back to polling while the socket is down. No React, no DOM beyond the global WebSocket (overridable).

See CATALOG.md for exports and examples.

Install

pnpm add @zedtech/zedkit-live

Use

import { pollingSource, wsSource } from "@zedtech/zedkit-live";

const source = wsSource<{ id: string }>({
  url: "wss://example.com/live",
  fallback: pollingSource({ intervalMs: 10_000, poll: () => fetchLatest() }),
});

const stop = source.subscribe((message) => refresh(message));
source.onStatus((status) => console.log(status)); // connecting | live | retrying | idle
stop();

A source starts on its first subscriber and stops on its last unsubscribe. getStatus plus onStatus fit useSyncExternalStore or any store:

const status = useSyncExternalStore(source.onStatus, source.getStatus, () => "idle");

Behavior to know

  • Messages missed while the socket was down are not replayed. Make the fallback fetch current state.
  • Status only moves while at least one message listener is subscribed; subscribing to status alone starts nothing.
  • status describes the primary transport: retrying stays while a fallback delivers messages.
  • A throwing listener does not affect other listeners; errors go to onError.

Original work

Original work by the same author.