Production-ready PII detection and redaction library
npm install @openredaction/openredactProduction-ready PII detection and redaction library with 20+ built-in patterns, compliance presets, and zero dependencies.
``bash`
npm install openredact
`typescript
import { OpenRedact } from 'openredact';
const shield = new OpenRedact();
const result = shield.detect("Email john@example.com or call 07700900123");
console.log(result.redacted);
// "Email [EMAIL_9619] or call [PHONE_UK_MOBILE_9478]"
``
Full documentation available at GitHub
- ๐ Fast & Accurate (10-20ms for 2-3KB text)
- ๐ฏ 20+ PII Patterns (Email, SSN, credit cards, etc.)
- โ
Built-in Validators (Luhn, IBAN, NHS, etc.)
- ๐ Compliance Presets (GDPR, HIPAA, CCPA)
- ๐ญ Deterministic Placeholders
- ๐ณ Zero Dependencies
- ๐ TypeScript Native
- ๐งช 98%+ Test Coverage
MIT