0.0.2 • Published 1 year ago

@juunini/sleep v0.0.2

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

@juunini/sleep

A simple sleep function for JavaScript.

Installation

npm install @juunini/sleep

Usage

ES6

import sleep from '@juunini/sleep';
// or // import { sleep } from '@juunini/sleep';

await sleep(1000); // Sleep for 1 second

CommonJS

const sleep = require('@juunini/sleep');

await sleep(1000); // Sleep for 1 second

UMD in Browser

<!-- Include the script in your HTML file -->
<script src="https://unpkg.com/@juunini/sleep"></script>

<script>
  (async () => {
    await sleep(1000); // Sleep for 1 second
  })();
</script>

License

MIT

0.0.2

1 year ago

0.0.2-alpha.1

1 year ago

0.0.1

1 year ago

0.0.1-alpha.1

1 year ago