Graphorin API reference v0.7.0
Graphorin API reference / @graphorin/security / / normalizeForPiiMatching
Function: normalizeForPiiMatching()
ts
function normalizeForPiiMatching(text): string;Defined in: packages/security/src/guardrails/normalize.ts:41
Case-preserving variant of normalizeForMatching for the PII catalogue (W-150): NFKC + zero-width strip WITHOUT lowercasing. Several PII patterns are case-sensitive by design (IBAN's [A-Z]{2}\d{2}, base58 BTC addresses), so the injection catalogue's lowercase fold would break them. Both catalogues share the same threat rationale - cheap character-injection obfuscation - and now share the same Unicode pre-pass, differing only in case handling.
Parameters
| Parameter | Type |
|---|---|
text | string |
Returns
string