@youngbeen/sleep
v0.1.1
Published
Turn setTimeout into a promisefy way
Downloads
6
Maintainers
Readme
[TOC]
Sleep
Ever think about use setTimeout
like promise? Here it is.
Features
- Friendly api as promise
- Light like feather(only 365B)
Install
Install it via npm
npm install @youngbeen/sleep
Import
import { sleep } from '@youngbeen/sleep'
Usage
sleep(2000).then(() => {
// run after 2 seconds
})