feat: add sleep util

Philipp Burckhardt 2023-06-06 21:03:39 -04:00
rodzic f8686afe27
commit 81eb5f4594
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: A2C3BCA4F31D1DDD
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -3,3 +3,6 @@ export const extractJSONObjectFromString = (text: string): string | undefined =>
export const extractJSONArrayFromString = (text: string): string | undefined =>
text.match(/\[(.|\n)*\]/gm)?.[0]
export const sleep = (ms: number) =>
new Promise((resolve) => setTimeout(resolve, ms))