Created
April 24, 2019 15:21
-
-
Save brettz9/994744472e1ed4347c17f65dd1f41924 to your computer and use it in GitHub Desktop.
timeout
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 timeout = (delay) => { | |
// eslint-disable-next-line promise/avoid-new | |
return new Promise((resolve) => { | |
setTimeout(() => { | |
resolve(); | |
}, delay || 0); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment