npm.io
1.0.0 • Published 10 years ago

await-delay

Licence
GPL-3.0
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
Stars
12

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
}

Keywords