Piiranha v3.5.8 is a TypeScript library for removing personally identifiable information (PII) from text. It provides both synchronous and asynchronous APIs, built-in regex patterns for common PII types (names, emails, phone numbers, credit card numbers, IP addresses, SSNs, etc.), and supports custom redaction rules and replacement values. It is a maintained fork of solvvy/redact-pii, compiles to ES2016, and is tested on Node.js 18.x and 20.x. Key differentiators: dual sync/async API, customizable replacements, and extensible via custom regex or functions.
npm install piiranhaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Synchronous PII redaction: redacts names and phone numbers from a string.
Set custom replaceWith values in configuration if you need the old behavior.
Replace require('redact-pii') or import from 'redact-pii' with 'piiranha'.Use await or .then() when calling redactAsync().
Update configuration references from 'ssn' to 'usSocialSecurityNumber'.
Use import syntax, or in Node.js set "type": "module" in package.json, or use a transpiler like esbuild or webpack.
Use SyncRedactor with redact() and AsyncRedactor with redactAsync().
No dependency data recorded yet.