mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-06-27 17:22:42 +02:00
2 lines
131 B
TypeScript
2 lines
131 B
TypeScript
export const truncate = (text: string, maxLength = 50) =>
|
|
text.length > maxLength ? `${text.slice(0, maxLength - 3)}...` : text;
|