Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/security / / normalizeForMatching

Function: normalizeForMatching()

ts
function normalizeForMatching(text): string;

Defined in: packages/security/src/guardrails/normalize.ts:25

Fold text to a match-friendly form: NFKC (collapses fullwidth / compatibility homoglyphs), strip zero-width characters, lowercase. Whitespace and punctuation are PRESERVED (unlike the taint ledger's alphanumeric-only fold) so word-boundary regexes keep working.

Parameters

ParameterType
textstring

Returns

string

Stable