Created
September 23, 2021 13:59
-
-
Save mrocha98/5c95c2770b40bee62acbe4988dbbafbe to your computer and use it in GitHub Desktop.
a dummy JS Promise to simulate a request
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 fakeRequest = (response = {}, delay = 1000) => | |
new Promise((resolve) => setTimeout(() => resolve(response), delay)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment