snapshot of https://github.com/mountain-loop/yaak.git (main, 2026-09-23; blobs > 131072B omitted)
This commit is contained in:
4
apps/yaak-client/lib/truncate.ts
Normal file
4
apps/yaak-client/lib/truncate.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export function truncate(text: string, len: number): string {
|
||||
if (text.length <= len) return text;
|
||||
return `${text.slice(0, len)}…`;
|
||||
}
|
||||
Reference in New Issue
Block a user