await-delay

use delay/sleep to async/await ES7

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
await-delay
901.0.06 years ago6 years agoMinified + gzip package size for await-delay in KB

Readme

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
}