Sanitizes a value for debug display by redacting sensitive data. Handles objects, arrays, strings, and primitives recursively with configurable depth limit.
The value to sanitize.
Sanitization options (redactSensitive, maxDepth).
Sanitized copy of the value, or original if redaction is disabled.
export function sanitizeForDebug( value: unknown, options: SanitizeOptions = {},): unknown { const { redactSensitive = true, maxDepth = 10 } = options; if (!redactSensitive) { return value; } return sanitizeValue(value, maxDepth);} Copy
export function sanitizeForDebug( value: unknown, options: SanitizeOptions = {},): unknown { const { redactSensitive = true, maxDepth = 10 } = options; if (!redactSensitive) { return value; } return sanitizeValue(value, maxDepth);}
Sanitizes a value for debug display by redacting sensitive data. Handles objects, arrays, strings, and primitives recursively with configurable depth limit.