Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cusspvz/await-delay

use delay/sleep/wait to async/await ES7
https://github.com/cusspvz/await-delay

async-await delay es7 promise sleep wait

Last synced: 3 months ago
JSON representation

use delay/sleep/wait to async/await ES7

Awesome Lists containing this project

README

        

# await-delay

use delay/sleep to async/await ES7

## Installation

```bash
npm i --save await-delay
```

## Usage

```js
import delay from 'await-delay'

async () => {
// Do something

// Wait for 2 seconds
await delay(2000)

// Do things after the delay
}

```