Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/trendyminds/delay

⏱ A promise-based setTimeout so you can await for a duration before proceeding
https://github.com/trendyminds/delay

Last synced: 6 days ago
JSON representation

⏱ A promise-based setTimeout so you can await for a duration before proceeding

Awesome Lists containing this project

README

        

# ⏱ Delay
A promise-based setTimeout so you can await for a duration before proceeding

## Install
```sh
npm i @trendyminds/delay
```

## Usage
```js
import delay from "@trendyminds/delay";

(async () => {
console.log("Hello");

// wait 2 seconds until the next command
await delay(2000);

console.log("world");
})();
```