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

@incognitify/core

v0.2.0

Published

Detect sensitive data, mask it for LLM calls, and rehydrate responses. Browser-safe, no I/O.

Readme

@incognitify/core

The engine and SDK behind incognitify: detect sensitive spans, mask them for LLM calls, and rehydrate the response.

npm install @incognitify/core

Quick start

import { mask, unmask } from '@incognitify/core';

const { masked, vault } = mask('Email [email protected] about card 4111111111111111.');
// masked: 'Email ⟦EMAIL_1⟧ about card ⟦CREDIT_CARD_1⟧.'

const llmResponse = await callYourLLM(masked);
// LLM sees tokens, never the real values.

const final = unmask(llmResponse, vault);
// Tokens swapped back to [email protected] and the card number.

What's in the box

  • DetectorsemailDetector, phoneDetector, creditCardDetector (with Luhn), ssnDetector, ipDetector (v4 + v6), apiKeyDetector (AWS / GitHub / OpenAI / Anthropic / Stripe / Slack / Google), uuidDetector. All shipped together as ALL_PATTERN_DETECTORS.
  • mask(text, options?) — orchestrator that runs detectors, resolves overlaps (longest span wins), and replaces with vault-cached tokens.
  • unmask(text, vault) — exact-token rehydration; safe against model-generated prose that includes a token (replaced) or a token-shaped string the vault doesn't recognize (left alone).
  • InMemoryVault — the default Vault. Rejects token collisions so a bug can't silently corrupt rehydration.
  • placeholderStrategy — produces ⟦TYPE_N⟧ tokens with Unicode corner brackets that don't occur naturally in prose.
  • serializeVault / deserializeVault — versioned JSON for explicit, opt-in persistence.

Constraints

  • Browser-safe. No Node-only APIs.
  • No I/O. Pure transform library.
  • Ephemeral, in-memory vault — never written to disk by this package.

Extending

Detector, MaskingStrategy, and Vault are all interfaces — bring your own. Detectors compose freely; the orchestrator resolves overlaps for you.

import { mask, type Detector } from '@incognitify/core';

const myDetector: Detector = {
  name: 'invoice-id',
  detect: (text) => [...text.matchAll(/INV-\d{6}/g)].map((m) => ({
    start: m.index!,
    end: m.index! + m[0].length,
    type: 'INVOICE_ID',
    value: m[0],
  })),
};

mask('see INV-123456', { detectors: [myDetector] });

Licensed under Apache-2.0.