(str: string, maxLength: number)
| 26 | } |
| 27 | |
| 28 | export function truncate(str: string, maxLength: number): string { |
| 29 | if (str.length <= maxLength) return str; |
| 30 | return str.slice(0, maxLength - 3) + "..."; |
| 31 | } |
| 32 | |
| 33 | export function extractTextContent(content: unknown): string { |
| 34 | if (typeof content === "string") return content; |
nothing calls this directly
no outgoing calls
no test coverage detected