0.1.2 • Published 1 year ago

@bemedev/sleep v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

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 😯 !