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

@radiate-so/js-sdk

v0.1.1

Published

Isomorphic tracking SDK for the Radiate CDP — browser, Node, and Cloudflare Workers.

Readme

@radiate-so/js-sdk

Isomorphic tracking SDK for the Radiate CDP. Works identically in the browser, Node, and Cloudflare Workers — uses only globalThis.fetch and crypto.randomUUID(), no environment-specific code paths.

This is the core SDK: a thin, stateless HTTP client around /v1/track, /v1/identify, and /v1/profile. It does not manage queues, anonymous-ID storage, session lifecycles, or unload flushing — those belong in the future @radiate-so/browser-sdk (and downstream framework wrappers like @radiate-so/react-sdk).

Install

pnpm add @radiate-so/js-sdk

Usage

Browser (public key)

import { Radiate } from '@radiate-so/js-sdk'

const radiate = new Radiate({ publicKey: 'pk_...' })

await radiate.track({
  event: 'page_view',
  properties: { path: '/pricing' },
  anonymous_id: 'a-id-from-caller-storage',
})

The Origin header is set automatically by the browser; the server checks it against the public key's allowlist.

Server (secret key)

import { Radiate } from '@radiate-so/js-sdk'

const radiate = new Radiate({ secretKey: process.env.RADIATE_KEY! })

await radiate.identify({
  user_id: 'usr_123',
  email: '[email protected]',
  traits: { plan: 'pro' },
})

await radiate.trackBatch([
  { event: 'signup', user_id: 'usr_123', properties: { plan: 'pro' } },
  { event: 'welcome_seen', user_id: 'usr_123' },
])

const profile = await radiate.profile({ user_id: 'usr_123' })

API

| Method | Notes | |---|---| | track(event) | Single event. Wire: POST /v1/track with [event]. | | trackBatch(events) | Array of events in one POST. | | identify(payload) | Secret-key only. | | profile(identifiers) | Secret-key only. Returns the resolved profile. |

The SDK fills in message_id (UUID v4) and timestamp (ms epoch) when missing — gives stable idempotency keys for retries.

Why no queue / storage / unload?

The browser-specific lifecycle (queue events, batch them on size / interval / unload, persist anonymous_id in localStorage) belongs in a per-environment wrapper. Keeping the core slim means it ships the same in Workers (where queueing across requests is wrong) and Node (where caller-controlled lifecycles are the norm).

@radiate-so/browser-sdk will compose this package and add those behaviours.