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: 4 months 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 (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-01T20:46:15.000Z (about 5 years ago)
- Last Synced: 2025-02-25T14:54:48.325Z (5 months 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");
})();
```