shleep

1.0.5 • Public • Published

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

Package Sidebar

Install

npm i shleep

Weekly Downloads

1

Version

1.0.5

License

MIT

Unpacked Size

4.01 kB

Total Files

10

Last publish

Collaborators

  • stealtheritz