From e950b84df5dc3d021f05bfc75f08674ddde54931 Mon Sep 17 00:00:00 2001 From: Yash Date: Tue, 2 Apr 2024 15:44:50 +0000 Subject: memory bar --- apps/web/src/lib/utils.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'apps/web/src/lib') 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}`; +} -- cgit v1.2.3