Skip to content

Commit

Permalink
feat: add sleep function
Browse files Browse the repository at this point in the history
  • Loading branch information
BenElferink committed Feb 5, 2025
1 parent 8eb1c54 commit 9fbfcff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/functions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ export * from './parse-json-string-to-pretty-string'
export * from './remove-empty-values-from-object'
export * from './safe-json-parse'
export * from './safe-json-stringify'
export * from './sleep'
export * from './stringify-non-string-values'
1 change: 1 addition & 0 deletions src/functions/sleep/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const sleep = async (ms = 1000) => new Promise((resolve) => setTimeout(resolve, ms))

0 comments on commit 9fbfcff

Please sign in to comment.