diff options
| author | Adam <[email protected]> | 2025-11-18 11:00:27 -0600 |
|---|---|---|
| committer | opencode <[email protected]> | 2025-11-18 17:07:34 +0000 |
| commit | fc5fc2c570e6ac5a6f9647080b80f7fec0c4b605 (patch) | |
| tree | a3971bfbe17308df9f2d3e1771c0ab544900c099 /packages/desktop/src/utils | |
| parent | 4069999b782cc00d4e707f5eca32082bdfad45bc (diff) | |
| download | opencode-fc5fc2c570e6ac5a6f9647080b80f7fec0c4b605.tar.gz opencode-fc5fc2c570e6ac5a6f9647080b80f7fec0c4b605.zip | |
wip(desktop): new layout work
Diffstat (limited to 'packages/desktop/src/utils')
| -rw-r--r-- | packages/desktop/src/utils/encode.ts | 7 | ||||
| -rw-r--r-- | packages/desktop/src/utils/index.ts | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/packages/desktop/src/utils/encode.ts b/packages/desktop/src/utils/encode.ts new file mode 100644 index 000000000..265bba5c4 --- /dev/null +++ b/packages/desktop/src/utils/encode.ts @@ -0,0 +1,7 @@ +export function base64Encode(value: string) { + return btoa(value).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "") +} + +export function base64Decode(value: string) { + return atob(value.replace(/-/g, "+").replace(/_/g, "/")) +} diff --git a/packages/desktop/src/utils/index.ts b/packages/desktop/src/utils/index.ts index ae89e4417..63a656cc4 100644 --- a/packages/desktop/src/utils/index.ts +++ b/packages/desktop/src/utils/index.ts @@ -1,2 +1,3 @@ export * from "./path" export * from "./dom" +export * from "./encode" |
