From 02fd2e97f2c8a53bf2344e6fa8b14769cb15ee38 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:35:37 +1100 Subject: refactor: move ts to src Also move popupwindow to own file --- src/utils/strings.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/utils/strings.ts (limited to 'src/utils/strings.ts') diff --git a/src/utils/strings.ts b/src/utils/strings.ts new file mode 100644 index 0000000..e5bc43e --- /dev/null +++ b/src/utils/strings.ts @@ -0,0 +1 @@ +export const ellipsize = (str: string, len = 40) => (str.length > len ? `${str.slice(0, len - 1)}…` : str); -- cgit v1.2.3-freya