JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 136
  • Score
    100M100P100Q70865F
  • License MIT

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

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