Created
March 13, 2018 14:24
-
-
Save 73nko/25845f0ffa7c87d22807030d58210770 to your computer and use it in GitHub Desktop.
A small function to promisify SetTimeout and use it with async await
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 timer = time => | |
new Promise(resolve => setTimeout(resolve, time)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment