blob: 6ec5888abbf93dffd6fcfc7b86617df9998143f0 [file] [log] [blame]
Samuel Shuert27bf3cd2023-03-03 15:51:25 -05001export default (str: string, max: number): string => {
2 if (str.length <= max) return str;
3 return str.slice(0, max - 3) + "...";
4}