SanitizeOptions
Defined in: safeStringify.ts:37
Properties
Section titled “Properties”excludeKeys?
Section titled “excludeKeys?”
optionalexcludeKeys?: readonlystring[] |Set<string>
Defined in: safeStringify.ts:39
Keys or dot-paths to completely exclude from the output (exact, case-sensitive match).
optionalmode?:"json"|"clone"
Defined in: safeStringify.ts:51
Sanitization mode:
- ‘json’: normalizes rich types (Date, Map, Set, Error) to JSON-friendly primitives/objects.
- ‘clone’: deeply clones Date, RegExp, Map, Set, and binary values with their classes. An
Error becomes a plain
Errorcarrying its name, message, stack, and own enumerable properties; any other object becomes a plain object.
redactKeys?
Section titled “redactKeys?”
optionalredactKeys?: readonlystring[] |Set<string>
Defined in: safeStringify.ts:41
Keys or dot-paths to mask with REDACTED, matched ignoring case, _ and -.
redactReplacement?
Section titled “redactReplacement?”
optionalredactReplacement?:string
Defined in: safeStringify.ts:43
Replacement string for redacted fields. Default: REDACTED.