mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-06-28 01:32:42 +02:00
parent
da72cd708b
commit
59cbc8b474
12 changed files with 317 additions and 190 deletions
2
src/utils/string.ts
Normal file
2
src/utils/string.ts
Normal file
|
@ -0,0 +1,2 @@
|
|||
export const truncate = (text: string, maxLength = 50) =>
|
||||
text.length > maxLength ? `${text.slice(0, maxLength - 3)}...` : text;
|
Loading…
Add table
Add a link
Reference in a new issue