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

@signal-kit/client

v0.1.2

Published

Tiny WebSocket client for Signal Kit. Subscribe to Twitch EventSub notifications from any JavaScript runtime.

Readme

@signal-kit/client

Tiny WebSocket client for Signal Kit. Subscribe to Twitch EventSub notifications using a relay token.

Install

npm install @signal-kit/client

Use it

import { SignalKit } from "@signal-kit/client";

const events = new SignalKit({
  url: "wss://signal.ryan.ceo/ws",
  token: process.env.SIGNAL_KIT_TOKEN!,
});

events.on("channel.cheer", ({ event }) => {
  console.log(`${event.user_name} cheered ${event.bits} bits`);
});

events.connect();

API

new SignalKit(options)

Options:

  • url (required) — Relay WebSocket URL.
  • token (required) — Relay token issued by the Signal Kit dashboard.
  • WebSocket — Optional WebSocket constructor. Defaults to globalThis.WebSocket. On older Node versions, pass the ws package: import { WebSocket } from "ws"; new SignalKit({ ..., WebSocket }).
  • reconnectMs — Auto-reconnect delay in ms. Default 2000. Pass false to disable.
  • terminalCloseCodes — Close codes that should not reconnect. Defaults to 1002, 1003, 1007, and 1008 so invalid/revoked tokens do not reconnect forever.
  • onOpen, onClose, onError — Lifecycle callbacks.

Methods

  • connect() — Open the connection. Auto-reconnects on close unless close() is called or reconnectMs: false.
  • close() — Disconnect and stop auto-reconnect.
  • on(type, handler) — Subscribe to a specific event type. Use "*" to receive everything. Returns an unsubscribe function.
  • once(type, handler) — Subscribe once.
  • off(type, handler) — Unsubscribe a specific handler.

Message shape

{
  type: "channel.cheer",
  subscription: { id: "...", type: "channel.cheer", version: "1" },
  event: { user_name: "viewer", bits: 100, /* ... */ },
  receivedAt: "2026-05-15T00:00:00.000Z"
}

The event field is the raw Twitch EventSub payload. Signal Kit does not reshape it.

Browser via <script> tag

Signal Kit also serves a global IIFE build at /twe-client.js on every Signal Kit instance:

<script src="https://signal.ryan.ceo/twe-client.js"></script>
<script>
  const events = new SignalKitClient({
    url: "wss://signal.ryan.ceo/ws",
    token: "sk_live_...",
  });
  events.on("channel.cheer", ({ event }) => console.log(event));
  events.connect();
</script>

License

MIT.