Skip to content

Commit

Permalink
Add a static sleep function
Browse files Browse the repository at this point in the history
  • Loading branch information
kossidts committed Mar 27, 2024
1 parent 2e9a3cc commit 71f831f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,6 @@ const resolver = (item, timeout, ...params) => {
return promisedItem.then(result => [null, result]).catch(err => [err, null]);
};

resolver.sleep = ms => resolver(null, ms);

module.exports = resolver;

0 comments on commit 71f831f

Please sign in to comment.