1.1.1 • Published 5 months ago

extra-sleep v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Sleep for specified time. šŸ“¦ Node.js, 🌐 Web, 🐚 Shell, šŸ“œ Files, šŸ“° Docs, šŸ“˜ Wiki.

sleep is a command in Unix-like operating systems that suspends program execution for specified time. This provides both a synchronous and an asynchronous method for sleeping without doing a busy wait. The synchronous sleep is achieved using Atomics.wait(), and the asynchronous one is achived using Promisified setTimeout().

This package is available in Node.js and Web formats. To use it on the web, simply use the extra_sleep global variable after loading with a <script> tag from the jsDelivr CDN.

Stability: Experimental.

const {sleep} = require('extra-sleep');
// import {sleep} from "extra-sleep";
// import {sleep} from "https://unpkg.com/extra-sleep/index.mjs"; (deno)


async function main() {
  console.log('Turn on Alarm');
  await sleep(1000);
  console.log('Turn on Shower');
}
main();

Index

PropertyDescription
sleepSleep for specified time (async).
sleepSyncSleep for specified time.

References

npm.io ORG DOI Coverage Status Test Coverage Maintainability

1.1.1

5 months ago

1.1.0

5 months ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.20

2 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.2

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.12

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.30

3 years ago

0.0.29

3 years ago

0.0.28

3 years ago

0.0.27

3 years ago

0.0.26

3 years ago

0.0.25

3 years ago

0.0.24

3 years ago

0.0.23

3 years ago

0.0.22

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago