sleyp

A function to sleep

Usage no npm install needed!

<script type="module">
  import sleyp from 'https://cdn.skypack.dev/sleyp';
</script>

README

Sleyp

Sorry, sleep was taken.

A sleep implementation for that sweet async/await syntax

Anyway, here is an example

const sleep = require('sleyp');

(async () => {
    console.log("Hello,");
    await sleep(3000);
    console.log("World!");
})();