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

errorping

v0.1.0

Published

Modular, multi-channel error notification package with built-in storage for AI agent triage

Readme

errorping

Lightweight error capture library for the browser and Node.js. Catches errors and sends them to your backend via webhook. No opinions about storage, delivery, or notification — your backend decides what to do.

Install

npm install errorping

Quick start

import { init, Severity } from "errorping";

init({
  channels: [
    { type: "webhook", url: "https://your-backend.com/errorping" },
  ],
  appName: "my-app",
  minSeverity: Severity.ERROR,
});

Errors are now captured and POSTed to your webhook as JSON.

React

import { ErrorPingProvider } from "errorping/react";

function App() {
  return (
    <ErrorPingProvider
      config={{
        channels: [{ type: "webhook", url: "/api/errorping" }],
        captureConsoleErrors: true,
        captureUnhandledRejections: true,
      }}
      fallback={({ error, reset }) => (
        <div>
          <p>Something went wrong: {error.message}</p>
          <button onClick={reset}>Try again</button>
        </div>
      )}
    >
      {children}
    </ErrorPingProvider>
  );
}

The provider wraps your app with an error boundary and global listeners (window.onerror, unhandledrejection).

What it captures

Each error event includes:

  • id — unique UUID
  • severity — INFO (0), WARNING (1), ERROR (2), CRITICAL (3)
  • name, message, stack — from the Error object
  • fingerprint — djb2 hash for deduplication
  • context — runtime, URL, method, environment, release, etc.
  • timestamp, occurrences, firstSeen

Built-in pipeline

  • Deduplication — groups identical errors within a sliding window (default 60s)
  • Rate limiting — token bucket, default 30 events/minute
  • Console patching — optionally capture console.error() calls
  • Global listenerswindow.onerror, unhandledrejection, uncaughtException
  • beforeSend hook — filter or modify events before dispatch

Configuration

init({
  channels: [{ type: "webhook", url: "..." }],
  appName: "my-app",
  environment: "production",
  release: "1.2.3",
  minSeverity: Severity.ERROR,
  captureConsoleErrors: true,
  captureUnhandledRejections: true,
  captureUncaughtExceptions: true,
  dedupWindowMs: 60_000,
  maxEventsPerMinute: 30,
  beforeSend: (event) => event,          // return null to drop
  onAfterSend: (event, results) => {},   // callback after dispatch
  classifySeverity: (error, ctx) => Severity.ERROR,
  fingerprint: (error, ctx) => "custom-fp",
  silent: false,
  debug: false,
});

Backend

errorping doesn't include a backend — it just sends events to a webhook URL. Use backend-template to get a ready-made backend that stores errors in Postgres and forwards to Telegram.

API

import { captureError, captureMessage } from "errorping";

// Capture an error
captureError(new Error("something broke"), { severity: Severity.CRITICAL });

// Capture a message
captureMessage("User signed up", { severity: Severity.INFO });

From React:

import { useErrorPing } from "errorping/react";

function MyComponent() {
  const { captureError, captureMessage } = useErrorPing();
  // ...
}

License

MIT