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

@errpulse/core

v0.6.0

Published

Shared types, fingerprinting, and error explanations for ErrPulse

Readme

@errpulse/core

Shared types, error fingerprinting, PII sanitization, and plain-English error explanations for the ErrPulse ecosystem.

Installation

npm install @errpulse/core

Usage

Error Fingerprinting

import { computeFingerprint } from "@errpulse/core";

const fingerprint = computeFingerprint({
  type: "TypeError",
  message: "Cannot read properties of undefined",
  stackFrames: [{ file: "app.ts", line: 42, column: 5, function: "handleClick" }],
});
// SHA-256 hash — same error = same fingerprint

Error Explanations

import { explainError, ERROR_PATTERNS } from "@errpulse/core";

const explanation = explainError(
  "TypeError",
  "Cannot read properties of undefined (reading 'map')"
);
// => { title: "...", explanation: "...", suggestion: "..." }

console.log(ERROR_PATTERNS.length); // 46 built-in patterns

Types & Enums

import type {
  ErrPulseEvent,
  ErrorGroup,
  StackFrame,
  LogEntry,
  EnvironmentInfo,
  RequestContext,
  WebSocketMessage,
  Project,
} from "@errpulse/core";

import {
  ErrorSource, // Backend | Frontend
  ErrorType, // UncaughtException, HttpError, ConsoleError, etc.
  ErrorStatus, // Unresolved, Acknowledged, Resolved, Ignored
  Severity, // Fatal, Error, Warning, Info
  LogLevel, // Log, Info, Warn, Debug
} from "@errpulse/core";

PII Sanitization

import { sanitizeHeaders, sanitizeObject } from "@errpulse/core";

const safe = sanitizeHeaders({ Authorization: "Bearer xxx", "Content-Type": "application/json" });
// => { Authorization: "[REDACTED]", "Content-Type": "application/json" }

const safeBody = sanitizeObject({ username: "john", password: "secret123" });
// => { username: "john", password: "[REDACTED]" }

UUID Generation

import { generateEventId, generateCorrelationId } from "@errpulse/core";

const eventId = generateEventId(); // Unique event identifier
const corrId = generateCorrelationId(); // For request tracing across frontend/backend

Message Normalization

import { normalizeMessage, normalizeStackFrames, getInAppFrames } from "@errpulse/core";

const normalized = normalizeMessage("Error at 0x1a2b3c in /Users/john/app.ts:42:5");
// Strips memory addresses, absolute paths, line numbers for stable fingerprinting

const appFrames = getInAppFrames(stackFrames);
// Filters out node_modules frames

Constants

import {
  BATCH_SIZE, // 10 events per batch
  BATCH_INTERVAL_MS, // 100ms flush interval
  LOG_BATCH_SIZE, // 20 logs per batch
  LOG_BATCH_INTERVAL_MS, // 500ms flush interval for logs
  EVENTS_ENDPOINT, // /api/events
  LOGS_ENDPOINT, // /api/logs
  CORRELATION_HEADER, // x-errpulse-correlation-id
  MAX_MESSAGE_LENGTH, // 2048 characters
  SENSITIVE_HEADERS, // ['authorization', 'cookie', ...]
  SENSITIVE_FIELDS, // ['password', 'token', 'apiKey', ...]
} from "@errpulse/core";

Key Features

  • Error Fingerprinting — SHA-256 based deduplication using error type, normalized message, and top 3 in-app stack frames
  • 46 Built-in Error Patterns — Plain-English explanations for common errors (ECONNREFUSED, CORS, React hooks, module not found, etc.)
  • PII Sanitization — Strips Authorization, Cookie, password, token, apiKey, creditCard, SSN, and 15+ other sensitive fields
  • Shared Types — TypeScript types and enums used across all ErrPulse packages, including LogLevel and LogEntry for console log capture
  • UUID Generation — Event IDs and correlation IDs for request tracing across frontend and backend
  • Message Normalization — Strips noise (memory addresses, UUIDs, line numbers, absolute paths) for stable fingerprinting

Documentation

License

MIT