commit | b5e9d55b0b543110d7c93612c9292fed3384ce54 | [log] [tgz] |
---|---|---|
author | TheCodedProf <samuel.shuert@gmail.com> | Sun Jan 29 15:43:26 2023 -0500 |
committer | TheCodedProf <samuel.shuert@gmail.com> | Sun Jan 29 15:43:26 2023 -0500 |
tree | 209b5fac4f474c8ef7bdea497ffa9c6b0402ef00 | |
parent | 14d11f6c24ba8d0529c415fda5e16b6c8a722c61 [diff] [blame] |
worked on scanners, database, tracks, some moving around and cleaning up files.
diff --git a/src/utils/ellipsis.ts b/src/utils/ellipsis.ts new file mode 100644 index 0000000..6ec5888 --- /dev/null +++ b/src/utils/ellipsis.ts
@@ -0,0 +1,4 @@ +export default (str: string, max: number): string => { + if (str.length <= max) return str; + return str.slice(0, max - 3) + "..."; +} \ No newline at end of file