summaryrefslogtreecommitdiff
path: root/utils/strings.ts
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-12 18:00:54 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-12 18:00:54 +1100
commitb4aca729ddae0526b66822698db7066cb09e1682 (patch)
tree2a406cca4cfc616dd22ce7c1be61cc20d5db85bc /utils/strings.ts
parentInitial commit (diff)
downloadcaelestia-shell-b4aca729ddae0526b66822698db7066cb09e1682.tar.gz
caelestia-shell-b4aca729ddae0526b66822698db7066cb09e1682.tar.bz2
caelestia-shell-b4aca729ddae0526b66822698db7066cb09e1682.zip
bar
Diffstat (limited to 'utils/strings.ts')
-rw-r--r--utils/strings.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/strings.ts b/utils/strings.ts
new file mode 100644
index 0000000..e5bc43e
--- /dev/null
+++ b/utils/strings.ts
@@ -0,0 +1 @@
+export const ellipsize = (str: string, len = 40) => (str.length > len ? `${str.slice(0, len - 1)}…` : str);