shleep
v1.0.5
Published
A es6, async blocking sleep lib
Downloads
15
Maintainers
Readme
shleep is a promise based sleep function 😴
Shleep is tiny,coming in at 183 bytes
Installation
Yarn
yarn install shleep
Npm
npm install -S shleep
Usage
import sleep from 'shleep'
// Standard promise
sleep(1000).then(/* Do stuff */)
// async await
async function yourAsyncFunction() {
await sleep(1000)
/* do stuff here */
}