This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
export function truncate(str: string, maxLength: number = 100): string {
|
||||
if (str.length <= maxLength) return str;
|
||||
return str.slice(0, maxLength) + '...';
|
||||
}
|
||||
Reference in New Issue
Block a user