TheCodedProf | b5e9d55 | 2023-01-29 15:43:26 -0500 | [diff] [blame] | 1 | export default (str: string, max: number): string => { |
2 | if (str.length <= max) return str; | ||||
3 | return str.slice(0, max - 3) + "..."; | ||||
Skyler Grey | da16adf | 2023-03-05 10:22:12 +0000 | [diff] [blame] | 4 | }; |