Created
July 15, 2019 13:21
-
-
Save thomasxbanks/88112d9291e5a5e81cb52fa592d1fd23 to your computer and use it in GitHub Desktop.
Fake an API response using a delay
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
| const delay = ms => new Promise(resolve => setTimeout(resolve, ms)) | |
| delay(500).then(() => console.log(`hello world`)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment