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

velyn-sdk

v0.1.2

Published

Lightweight browser SDK that captures frontend events (clicks, API calls, errors) and sends them to a Velyn backend for causal timeline analysis and automated test generation.

Readme

velyn-sdk

Lightweight browser SDK that captures frontend events (clicks, API calls, errors) and sends them to a Velyn backend for causal timeline analysis and automated Playwright test generation.

Install

npm install velyn-sdk

Quick Start — Auto Mode

Drop this into your app's entry point. The SDK will automatically patch fetch, XMLHttpRequest, clicks, window.onerror, and unhandled promise rejections.

import { initVelyn } from "velyn-sdk";

const velyn = initVelyn({
  endpoint: "https://your-velyn-backend.com/ingest",
  apiKey: "your-api-key",
});

// That's it. Events are captured and flushed automatically.

// To stop capturing (e.g. on logout):
// velyn.stop();

Manual Tracking

If you prefer full control, disable auto-instrumentation and track events yourself:

import { Velyn } from "velyn-sdk";

const velyn = new Velyn({
  endpoint: "https://your-velyn-backend.com/ingest",
  apiKey: "your-api-key",
  autoInstrument: false,
});
velyn.start();

// Track a user action
velyn.trackAction("click", "#checkout-button");

// Track an API call
velyn.trackApi("/api/checkout", "POST", 500);

// Track an error
velyn.trackError("TypeError: Cannot read properties of undefined", "TypeError");

Sentry Integration

If your app already uses Sentry, Velyn can piggyback on Sentry events to automatically extract breadcrumbs and errors — no duplicate instrumentation needed:

import * as Sentry from "@sentry/browser";
import { initVelyn } from "velyn-sdk";

const velyn = initVelyn({
  endpoint: "https://your-velyn-backend.com/ingest",
  apiKey: "your-api-key",
  autoInstrument: false, // Sentry already captures everything
});

Sentry.init({
  dsn: "your-sentry-dsn",
  beforeSend(event) {
    velyn.captureFromSentryEvent(event);
    return event;
  },
});

Configuration

| Option | Type | Default | Description | |---|---|---|---| | endpoint | string | required | Full URL of the Velyn ingestion endpoint | | apiKey | string | undefined | Sent as x-api-key header | | autoInstrument | boolean | true | Patch browser APIs to capture events automatically | | flushIntervalMs | number | 5000 | Milliseconds between automatic flushes | | maxBatchSize | number | 30 | Max events sent per flush | | sessionId | string | auto-generated | Override the generated session ID | | onFlush | (result) => void | undefined | Callback after each successful flush |

API

initVelyn(config): Velyn

Creates and starts a Velyn instance with autoInstrument: true by default.

new Velyn(config)

Creates an instance without starting it. Call .start() when ready.

Instance Methods

| Method | Description | |---|---| | .start() | Begin flushing and (if enabled) auto-instrumentation | | .stop() | Stop flushing and remove all patches | | .flush() | Immediately send queued events | | .trackAction(actionType, target, value?) | Manually track a user action | | .trackApi(url, method, status) | Manually track an API request | | .trackError(message, name?, stack?) | Manually track an error | | .captureFromSentryEvent(event) | Extract and enqueue events from a Sentry event object |

License

MIT