Type alias CorjRedactPolicyInput

CorjRedactPolicyInput: {
    keys?: readonly (string | RegExp)[];
    paths?: readonly (string | RegExp)[];
    patterns?: readonly RegExp[];
    replacement?: string;
    transform?: CorjRedactTransform | null;
}

A redaction policy as it is passed in; every part is optional.

Type declaration

  • Optional keys?: readonly (string | RegExp)[]

    Property names never read from the caught object. A string matches exactly.

  • Optional paths?: readonly (string | RegExp)[]

    JSONPaths never read, e.g. "$.cause.config.headers". A string matches exactly.

  • Optional patterns?: readonly RegExp[]

    Applied with String.prototype.replace to every string the report emits.

  • Optional replacement?: string

    What an excluded value and a pattern match become. Defaults to CORJ_REDACTED_MARKER.

  • Optional transform?: CorjRedactTransform | null

    Runs after the above on every value the report emits.