(
value: string | undefined,
maxLength: number,
)
| 492 | } |
| 493 | |
| 494 | function truncateString( |
| 495 | value: string | undefined, |
| 496 | maxLength: number, |
| 497 | ): string | undefined { |
| 498 | if (!value) return undefined; |
| 499 | if (value.length <= maxLength) return value; |
| 500 | return `${value.slice(0, maxLength)}...`; |
| 501 | } |
no test coverage detected