From 420edf4da591ba263693895b3d9f3df27d0b7a31 Mon Sep 17 00:00:00 2001 From: rharkor Date: Sat, 17 Feb 2024 18:33:25 +0100 Subject: [PATCH] feat: sleep utils --- packages/app/src/lib/utils/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/app/src/lib/utils/index.ts b/packages/app/src/lib/utils/index.ts index 3d48efcc..05f35d92 100644 --- a/packages/app/src/lib/utils/index.ts +++ b/packages/app/src/lib/utils/index.ts @@ -185,3 +185,7 @@ export function stringToSlug(string: string): string { .replace(/[^\w -]+/g, "") .replace(/ +/g, "-") } + +export function sleep(ms: number) { + return new Promise((resolve) => setTimeout(resolve, ms)) +}