Package Exports
- @bemedev/sleep
- @bemedev/sleep/lib/index.js
- @bemedev/sleep/lib/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bemedev/sleep) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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 π― !