https://github.com/dalbodeule/sleep
https://github.com/dalbodeule/sleep
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dalbodeule/sleep
- Owner: dalbodeule
- License: mit
- Created: 2018-10-13T16:08:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-13T16:08:31.000Z (over 7 years ago)
- Last Synced: 2025-03-18T13:56:09.908Z (11 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sleep
[](https://badge.fury.io/js/sleeps)
[](https://nodei.co/npm/sleeps/)
Promise 및 Async/Await 를 지원하는 setTimeout 모듈입니다.
## 필요 모듈
Node.js 6.0 이상
## 사용법
```javascript
const sleep = require('sleep');
(async() => {
await sleep(500);
})();
```
위와 같은 방법으로 사용하시면 됩니다.
## 함수 목록
```javascript
require('sleep')((time));
```
## 반환
Promise 가 반환됩니다.