diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-03-01 22:01:55 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-03-01 22:01:55 +1100 |
| commit | 9c1cc00965170b85146ddcdaff9eeb522e1a8d48 (patch) | |
| tree | 7190907197ce94aef1d23f763935bb90bc02be0b /src/utils | |
| parent | launcher: scheme autocomplete (diff) | |
| download | caelestia-shell-9c1cc00965170b85146ddcdaff9eeb522e1a8d48.tar.gz caelestia-shell-9c1cc00965170b85146ddcdaff9eeb522e1a8d48.tar.bz2 caelestia-shell-9c1cc00965170b85146ddcdaff9eeb522e1a8d48.zip | |
launcher: wallpaper action
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/strings.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils/strings.ts b/src/utils/strings.ts index df2f781..2fd4c76 100644 --- a/src/utils/strings.ts +++ b/src/utils/strings.ts @@ -1 +1,3 @@ export const ellipsize = (str: string, len: number) => (str.length > len ? `${str.slice(0, len - 1)}…` : str); + +export const basename = (path: string) => path.slice(path.lastIndexOf("/") + 1, path.lastIndexOf(".")); |