Function
truncate
(str: string, maxLength: number)
Source from the content-addressed store, hash-verified
| 1 | export function truncate(str: string, maxLength: number) { |
| 2 | return str.length > maxLength ? str.slice(0, maxLength - 1) + "…" : str; |
| 3 | } |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…