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

@alphacharts/report

v0.1.0

Published

Opt-in, anonymous crash reports for alphacharts. Off unless you call enableCrashReporting with your own PostHog endpoint and key; there is no default server.

Readme

@alphacharts/report

Opt-in, anonymous crash reports for alphacharts. Off by default. Importing this package does nothing: no listener, no timer, no network, no global window.onerror or unhandledrejection handler. Reporting starts only when you call enableCrashReporting() with the endpoint and key of your own PostHog project. There is no default server: without both, it throws and sends nothing.

import { enableCrashReporting } from "@alphacharts/report";

const disable = enableCrashReporting({
  endpoint: "https://your-posthog.example/batch", // required; full URL, used exactly as given: no path is appended
  key: "phc_...",                                  // required; that project's public capture key
  maxReports: 5,                                   // optional; per page load (default 5)
});
// disable() stops it.

It reports faults the core catches at its own entry points: the shared draw loop, the chart constructor, WebGL context loss and restore, and shader compile or link failures. To also report errors your code already receives:

import { errorForwarder, plotErrorForwarder } from "@alphacharts/report";

plot.on("error", plotErrorForwarder());
new DrawingsPlugin({ onError: errorForwarder("drawings", (e) => console.error(e)) });
new AlertsPlugin({ onError: errorForwarder("alerts") });
// datafeed: { onError: errorForwarder("feed") }

A forwarder reads only its first argument. The drawing object that DrawingsOptions.onError passes second is never read. The optional callback you pass receives the error only, so keep your own handler if you need the drawing.

What is sent

One PostHog $exception event, POST as text/plain JSON by navigator.sendBeacon, else fetch with keepalive. Failures are ignored. Per page load: the same fault is sent once and at most maxReports are sent.

| Field | Value | |---|---| | distinct_id | random UUID, new on every page load, never stored | | project | alphacharts | | version, report_version | the @alphacharts/core version that faulted; this package's version | | error_type | the error's class name (TypeError), or NonError / None | | source | draw-loop, ctor, context-lost, shader, plot, drawings, alerts, feed | | renderer | webgl or canvas2d, when known | | webgl2, context_lost | booleans | | browser, os | family and major version (Chrome 126), OS family | | $exception_list | one entry: the error type and the fixed label alphacharts fault: <source>. No message, no stack frames, no file names | | $process_person_profile, $geoip_disable | false, true |

Never sent: error messages, option, data, series, plugin or marker ids, symbols, prices, GPU vendor strings, page URL, cookies or any stored id. Your server still sees the sender's IP address; turn on your project's "discard client IP data" setting.

MIT licence.