Skip to content

Instantly share code, notes, and snippets.

@thomasxbanks
Created July 15, 2019 13:21
Show Gist options
  • Select an option

  • Save thomasxbanks/88112d9291e5a5e81cb52fa592d1fd23 to your computer and use it in GitHub Desktop.

Select an option

Save thomasxbanks/88112d9291e5a5e81cb52fa592d1fd23 to your computer and use it in GitHub Desktop.
Fake an API response using a delay
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