Skip to content

redactPii

function redactPii(text, detect?): PiiScanResult;

Scan and redact PII in text. Returns the redacted text plus the list of matches (detector + original matched text) so callers can audit what was found without re-detecting.

Parameter Type Default value

text

string

undefined

detect

PiiDetector[]

DEFAULT_DETECTORS

PiiScanResult