use delay/sleep/wait to async/await ES7
use delay/sleep to async/await ES7
npm i --save await-delay
import delay from 'await-delay'
async () => {
// Do something
// Wait for 2 seconds
await delay(2000)
// Do things after the delay
}