@bemedev/sleep
TypeScript icon, indicating that this package has built-in type declarations

0.1.2Β β€’Β PublicΒ β€’Β Published

The Ultimate package to sleep πŸ›Œ πŸ˜ͺ like a baby πŸ‘©πŸΎβ€πŸΌ


With this function ( sleep ), you can sleep the time you want !

Example

import sleep from '@bemedev/sleep';

const myCoolFunction = async () => {
  // Go to sleep
  await sleep(2); // 100 milliseconds by default

  // Sleeping...
  // Sleeping...

  // And wake up !
  console.log("I'm awake");
};

I don't know why the core-js team doesn't include this one. So I write the simplest package in the entire history of Javascript.



Enjoy your sleep

Maybe new ways to sleep will arrive soon 😯 !

Dependencies (0)

    Dev Dependencies (19)

    Package Sidebar

    Install

    npm i @bemedev/sleep

    Weekly Downloads

    0

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    4.61 kB

    Total Files

    8

    Last publish

    Collaborators

    • bemedev