Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 | 1x 9x 9x 9x | export function truncate(str: string, length = 500): string {
if (length < 0) throw new Error("Length must be non-negative");
return str.length > length ? `${str.slice(0, length)}...` : str;
}
|