diff options
| author | Dax <[email protected]> | 2025-09-15 03:28:08 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-09-15 03:28:08 -0400 |
| commit | 725104572e2b6d64dcfc145d4748124186427c7b (patch) | |
| tree | daf5b26437fd267bc41848e0578ed13d1b43bb52 /packages/app/src/utils/path.ts | |
| parent | 4954edf8aeb5b8b395fc4f4e91b7fe36cfab212d (diff) | |
| download | opencode-725104572e2b6d64dcfc145d4748124186427c7b.tar.gz opencode-725104572e2b6d64dcfc145d4748124186427c7b.zip | |
feat: add desktop/web app package (#2606)
Co-authored-by: adamdotdevin <[email protected]>
Co-authored-by: Adam <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
Diffstat (limited to 'packages/app/src/utils/path.ts')
| -rw-r--r-- | packages/app/src/utils/path.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/app/src/utils/path.ts b/packages/app/src/utils/path.ts new file mode 100644 index 000000000..d6a066e80 --- /dev/null +++ b/packages/app/src/utils/path.ts @@ -0,0 +1,9 @@ +export function getFilename(path: string) { + const parts = path.split("/") + return parts[parts.length - 1] +} + +export function getFileExtension(path: string) { + const parts = path.split(".") + return parts[parts.length - 1] +} |
