Created
March 18, 2021 00:49
-
-
Save autr/07065d1cd9583977b35c89af2d8617c5 to your computer and use it in GitHub Desktop.
async wait / timeout function for JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const wait = async ms => ( new Promise(resolve => setTimeout(resolve, ms) ) ) | |
module.exports = wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment