Created
July 12, 2021 01:02
-
-
Save stowball/472b4b2019829ca3d6fd02114e7bfc66 to your computer and use it in GitHub Desktop.
Dummy async function to resolve after 2 seconds
This file contains hidden or 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
function resolveAfter2Seconds(data) { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve(`resolved, ${data}`); | |
}, 2000); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment