await-delay

1.0.0 • Public • Published

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
}
 

Dependents (22)

Package Sidebar

Install

npm i await-delay

Weekly Downloads

1,166

Version

1.0.0

License

GPL-3.0

Last publish

Collaborators

  • cuss