(value: string, maxLength: number)
| 1 | const MAX_TELEMETRY_STRING_LENGTH = 240; |
| 2 | |
| 3 | function truncateTelemetryString(value: string, maxLength: number): string { |
| 4 | if (value.length <= maxLength) return value; |
| 5 | return `${value.slice(0, maxLength - 1)}…`; |
| 6 | } |
| 7 | |
| 8 | function redactUrlQueryStrings(value: string): string { |
| 9 | return value.replace(/\b(https?:\/\/[^\s?]+)\?[^\s]*/g, "$1?…"); |
no outgoing calls
no test coverage detected