(value: string, maxLength = 220)
| 332 | } |
| 333 | |
| 334 | export function truncateSnippet(value: string, maxLength = 220): string | undefined { |
| 335 | const normalized = value.replace(/\s+/g, " ").trim(); |
| 336 | if (!normalized) return undefined; |
| 337 | if (normalized.length <= maxLength) return normalized; |
| 338 | return `${normalized.slice(0, maxLength - 3)}...`; |
| 339 | } |
no outgoing calls
no test coverage detected