Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/trendyminds/delay
- Owner: trendyminds
- License: mit
- Created: 2020-04-24T17:16:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-01T20:46:15.000Z (over 4 years ago)
- Last Synced: 2024-11-10T02:05:29.916Z (11 days ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@trendyminds/delay
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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");
})();
```