diff options
| author | Yash <[email protected]> | 2024-04-02 15:44:50 +0000 |
|---|---|---|
| committer | Yash <[email protected]> | 2024-04-02 15:44:50 +0000 |
| commit | e950b84df5dc3d021f05bfc75f08674ddde54931 (patch) | |
| tree | fa27d7606b05edaf9efff3054df3427e86c85260 /apps/web/src/lib | |
| parent | placeholder (diff) | |
| download | supermemory-e950b84df5dc3d021f05bfc75f08674ddde54931.tar.xz supermemory-e950b84df5dc3d021f05bfc75f08674ddde54931.zip | |
memory bar
Diffstat (limited to 'apps/web/src/lib')
| -rw-r--r-- | apps/web/src/lib/utils.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/web/src/lib/utils.ts b/apps/web/src/lib/utils.ts index f60c00ea..c6678e4b 100644 --- a/apps/web/src/lib/utils.ts +++ b/apps/web/src/lib/utils.ts @@ -16,3 +16,11 @@ export function cleanUrl(url: string) { ? url.slice(7) : url; } + +export function generateId() { + return Math.random().toString(36).slice(2, 9); +} + +export function svgId(prefix: string, id: string) { + return `${prefix}-${id}`; +} |