(value: string)
| 83 | * @returns The string with sensitive patterns redacted |
| 84 | */ |
| 85 | export function redactSensitiveValues(value: string): string { |
| 86 | if (!value || typeof value !== 'string') { |
| 87 | return value |
| 88 | } |
| 89 | |
| 90 | let result = value |
| 91 | for (const { pattern, replacement } of SENSITIVE_VALUE_PATTERNS) { |
| 92 | result = result.replace(pattern, replacement) |
| 93 | } |
| 94 | return result |
| 95 | } |
| 96 | |
| 97 | export function isLargeDataKey(key: string): boolean { |
| 98 | return LARGE_DATA_KEYS.has(key) |
no test coverage detected