sensored
Streaming PII redaction library for TypeScript with 155 regex detectors, optional NER, and opt-in Jev confirmation before redacting names.
Overview
sensored is a streaming-first PII redaction library for TypeScript that runs on Node, Bun, Deno, browsers and edge runtimes with no runtime-specific dependencies. It ships 155 regex detectors across categories such as contact, financial, identity and legal data, a lightweight regex-plus-bloom-filter person name detector, optional NER through compromise.js, presets, streaming redaction, and restoration maps that turn placeholders back into the original values. A browser playground processes samples locally.
Semantic confirmation is an opt-in step: with @typesafe-ai/sdk installed and a key configured, redactAsync asks Jev to confirm each detected candidate before redacting it, reducing false positives. Currently only the person_name_lite detector uses it; sync redact and stream are unaffected, and it fails open if the provider is unavailable. The README reports that person_name_lite with Jev confirmation achieved 100% precision and recall on its evaluation corpus.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Is this detected candidate really a person's name (and so PII to redact)?(inferred) | — |
How it works
- Run regex and optional NER detectors over the text
- For person_name_lite candidates, ask Jev to confirm
- Redact confirmed candidates with numbered placeholders
- Optionally restore originals from the map
Strengths
- Fewer false positives on names
- Runs on many JS runtimes
- Fails open if the AI provider is down
Caveats
- Only one detector uses Jev so far
- Confirmation sends candidate text to TypeSafe
- 100% figure is on the project's own corpus
Getting started
npm install sensored (add @typesafe-ai/sdk for Jev), then createRedactor({ rules, semantic: { provider: "jev", apiKey } }).redactAsync(text).At a glance
- Type
- Project
- Status
- beta
- Language
- TypeScript
- Runtime
- Node, Bun, Deno, browser, edge
- Has code
- yes
- Has tests
- yes
Use cases and integrations
How curated lists describe it
Streaming PII redaction for TypeScript with regex and NER detectors, and an opt-in step where Jev confirms a detection before it is redacted.
MrJev/awesome-jev
Frequently asked questions
What does Jev decide in sensored?
Whether a detected person-name candidate is real PII before it is redacted.
Is Jev required?
No; semantic confirmation is opt-in and the regex and NER detectors work without it.
What if TypeSafe is unavailable?
Confirmation fails open and redaction continues.
Related projects
CLI that sends text to Jev for 13 PII-category yes/no checks and a sensitivity score, then locates spans with regex and segmentation.
CLIbetaTypeScriptFills Japanese government PDF forms by asking Jev which profile item each unlabeled field is; personal values stay in the browser.
ServicebetaJavaScriptPython re-style library that finds, replaces, splits and extracts text by meaning, with Jev judging each candidate span.
DemobetaPythonZero-dependency library that numbers a text's words so Jev can pick them, returning exact substrings for extraction and PII.
DemoprototypeTypeScriptZero-shot named entity recognition that turns Jev's Choice answers into entity spans via nominate, verify and boundary questions.
LibrarybetaPythonPython/TypeScript/Go chatbot safety library checking user input and bot replies with Jev and returning one actionable verdict per message.
LibraryproductionPython