Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/observability / redaction/imperative-patterns / stripImperativePatterns

Function: stripImperativePatterns()

ts
function stripImperativePatterns(body, patterns?): string;

Defined in: packages/observability/src/redaction/imperative-patterns.ts:246

Apply pattern.mask to every match of every pattern in body. Used by the 'detect-and-strip*' policies. The mask is calibrated to NOT match any imperative pattern itself, so post-strip bodies do not trigger another scan hit on round trips.

Parameters

ParameterTypeDefault value
bodystringundefined
patternsreadonly ImperativePattern[]BUILT_IN_IMPERATIVE_PATTERNS

Returns

string

Stable