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

@vitrinka/redact

v0.1.2

Published

vitrinka recorder redaction engine — safe-by-default scrubbing of auth headers, sensitive body keys, and URL secrets, driven by the workspace redaction policy. Shared by every vitrinka capture client.

Downloads

1,161

Readme

@vitrinka/redact

The vitrinka recorder redaction engine: safe-by-default scrubbing of auth-bearing headers, sensitive body keys, URL query/fragment secrets and PEM private keys (by value, under any key) in recorded sessions — extensible per workspace via the redaction policy the vitrinka server serves, and shared by every vitrinka capture client (@vitrinka/expo and the browser extension).

The vitrinka server applies the same policy again at ingest as the load-bearing backstop. This engine is defense in depth: with it, secrets never leave the device at all, and recorded payloads are smaller on the wire.

Usage

import {
  compileRules,
  redactHeaders,
  redactBody,
  redactUrl,
  redactAndCap,
  maskDirectives,
  pixelPolicy,
} from '@vitrinka/redact';

// Fetch the workspace policy at session start (GET /api/v1/recorder/policy).
// FAIL CLOSED: on any failure, compile null — the built-in safe defaults.
const rules = compileRules(policyOrNull);

redactHeaders(rules, { Authorization: 'Bearer …' });
//  → { Authorization: '[redacted]' }

redactBody(rules, '{"password":"hunter2"}', 'application/json');
//  → '{"password":"[redacted]"}'

redactUrl(rules, 'https://app.example.com/cb#access_token=…');
//  → 'https://app.example.com/cb#access_token=[redacted]'

redactAndCap(rules, body, 64 * 1024, contentType); // redact-then-cap, shape-aware

maskDirectives(rules); // rrweb-style DOM recorders: maskAllInputs/maskAllText
pixelPolicy(rules);    // screenshot recorders: 'none' | 'blur'

compileRules caches by policy identity — call it per event for free. fullFidelity: true in the policy (the self-host escape hatch, env-gated server-side) turns every transform into a pass-through; clients only honor the field, never default to it.

Porting to other platforms

The engine is specified language-agnostically in spec/REDACTION-SPEC.md, with a portable conformance suite in spec/vectors.json (ported from the server engine's table tests). A recorder for any UI technology — Flutter, native iOS/Android, desktop — implements the spec's surface transforms and must pass every vector. This TypeScript implementation is the reference.

License

Elastic License 2.0.