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

@pmate/log

v0.3.1

Published

Browser telemetry for PMate topic logs

Readme

@pmate/log

Browser telemetry written to separate log topics through log-api. A public intake key must first be registered for the exact service, environment, origins and topics. It is not an authentication credential and cannot write directly to Blockchain.

import { createLogger } from '@pmate/log'
const logger = createLogger({
  endpoint: 'https://log-api.pmate.chat',
  key: 'YOUR_PUBLIC_INTAKE_KEY',
  serviceId: 'pmate:developers', environment: 'prod',
})
logger.append('application', { data: { event: 'search', results: 12 } })
logger.append('console', 'Background job finished')

Creates PV events (including history navigation), CLS/FCP/INP/LCP/TTFB, and error events by default. Console capture is opt-in. Disable with pageViews, vitals, or errors: false. Initialize once per page; call close() on teardown. Web Vitals observers remain page-lifetime observers but stop emitting after close.

The queue holds at most 200 events by default (configurable up to 1,000), batches at most 50 events/48 KiB and attempts each event at most three times with the original ID/time. On hide/unload, queued topics and final Web Vitals are sent without waiting for an earlier batch, with at most 60,000 bytes outstanding per logger to stay within the browser keepalive limit; delivery is best effort, not guaranteed. Quotas are per public key, per log-api process. Console arguments are bounded and common credential keys are removed. URLs exclude query strings/fragments; use beforeSend(topic, entry) to redact application-specific data or return false to drop it. Never log credentials or request/response bodies.

Page views and performance facts

PV counts and performance measurements have different lifecycles. A slow or missing metric must not delay or create a page view, and changing rating thresholds must not require shipping a browser SDK or invalidate historical measurements.

The pv topic records one event on initial load, pathname navigation, and BFCache restore, with path, pageViewId, and schemaVersion. The vitals topic records available measurements separately: name, value, unit (ms, or score for CLS), metricId, and navigationType, plus the originating path and pageViewId. Ratings are computed by the consuming analysis layer, never sent by this SDK. Zero is a real measurement; absent/invalid metrics are not synthesized.

Web Vitals measure a document lifecycle. Delayed measurements stay associated with the original document visit after an SPA route change; they must not be mistaken for measurements of the newly visible route. A BFCache restore starts a new visit. PV and vitals use the existing independent topic batches and retry IDs.

Managed event intake

Use eventKey and appId for service-bound event intake without login. serviceId and environment are only required with the legacy key. Managed event traffic uses /event/logs/batch. With an explicit vitals scope, the same key sends Web Vitals to the runtime chain. Other runtime diagnostics require a separate scoped key. Prefer the scenario API web.init({key, appId}) from @pmate/log-sdk/web in application code.