diff --git a/legacy/src/utils.ts b/legacy/src/utils.ts index d407dfe5..447a7bc9 100644 --- a/legacy/src/utils.ts +++ b/legacy/src/utils.ts @@ -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))