1.0.5 • Published 5 years ago

shleep v1.0.5

Weekly downloads
61
License
MIT
Repository
github
Last release
5 years ago

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 */
}