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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.5
    3
    • latest

Version History

Package Sidebar

Install

npm i shleep

Weekly Downloads

4

Version

1.0.5

License

MIT

Unpacked Size

4.01 kB

Total Files

10

Last publish

Collaborators

  • stealtheritz