Skip to content

cusspvz/await-delay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

await-delay

use delay/sleep to async/await ES7

Installation

npm i --save await-delay

Usage

import delay from 'await-delay'

async () => {
  // Do something
  
  // Wait for 2 seconds 
  await delay(2000)

  // Do things after the delay
}