Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaxxreal/zen-sleep-js
Promise-based setTimeout.
https://github.com/jaxxreal/zen-sleep-js
js project promise settimeout sleep zen-sleep-js
Last synced: about 5 hours ago
JSON representation
Promise-based setTimeout.
- Host: GitHub
- URL: https://github.com/jaxxreal/zen-sleep-js
- Owner: jaxxreal
- License: mit
- Created: 2018-06-25T13:31:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-11T20:31:01.000Z (almost 6 years ago)
- Last Synced: 2024-10-06T10:47:45.697Z (about 1 month ago)
- Topics: js, project, promise, settimeout, sleep, zen-sleep-js
- Language: JavaScript
- Size: 2.93 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zen-sleep-js ![bundlephobia badge](https://img.shields.io/bundlephobia/minzip/zen-sleep-js.svg) ![downloads number](https://img.shields.io/npm/dt/zen-sleep-js.svg)
Dependency-free promise-based sleeping.
## Installation
```sh
npm i zen-sleep-js -S
```## Usage
```js
const sleep = require('zen-sleep-js');// Sleep for 1 second and do something then.
sleep(1000).then(...);// or
await sleep(1000);
```## License
MIT licensed.