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

@upmetrics/sdk

v0.11.0

Published

Upmetrics error-tracking SDK for browser/node/bun — Sentry-envelope compatible, PII-scrubbed.

Readme

@upmetrics/sdk

Error-tracking SDK for browser / node / bun. Sends Sentry-envelope-compatible events to an Upmetrics ingest endpoint, with PII scrubbing on by default.

import { init, captureException, captureMessage } from '@upmetrics/sdk';

init({
  dsn: 'https://<publicKey>@upmetrics.org/<projectId>',
  environment: 'production',
  release: `${appName}@${appVersion}`,
});

// window.onerror, unhandledrejection and failed fetches are auto-instrumented.
// Manual capture:
captureException(new Error('boom'));
captureMessage('something happened', 'warning');

PII scrubbing drops Authorization/Cookie/key headers and masks email / Danish CPR / phone patterns before send. Disable with init({ ..., disableScrub: true }) (not recommended).

Reading analytics back — fetchAnalytics (SERVER-SIDE ONLY)

Read a project's aggregated analytics to build your own dashboard. This carries the project api key (uk_…) — a secret with full project access — so call it only from your backend, never from browser code (the key would be visible in the network tab). Your frontend talks to your backend; your backend calls this.

import { fetchAnalytics, type AnalyticsResponse } from '@upmetrics/sdk';

const data: AnalyticsResponse = await fetchAnalytics({
  projectKey: process.env.UPMETRICS_UK!, // uk_… — server-side secret
  days: 7, // 1..365, server clamps; default 30
  // host defaults to https://upmetrics.org
});

console.log(data.totals.visitors, data.totals.pageviews);

// Breakdown lists are NamedCount[] — the label field is `value`, NOT `name`:
for (const page of data.topPages) {
  console.log(page.value, page.count); // e.g. "/pricing", 42
}

Notes:

  • The label field is value on every breakdown entry (topPages, referrers, countries, devices, browsers, os, events) — import AnalyticsResponse and use it directly rather than re-declaring the type, so you don't accidentally read .name.
  • series contains only days that had activity — there is no zero-fill. If you render a continuous line/bar chart, fill the empty days in yourself (iterate your date range and default missing days to { visitors: 0, pageviews: 0 }). fetchAnalytics deliberately returns the data as-is and leaves this render decision to you.
  • Throws on a non-2xx response (e.g. a 401 from a wrong/missing key), so a hidden auth failure surfaces instead of rendering an empty dashboard.