siwi-sleep

sleep for nodejs

Usage no npm install needed!

<script type="module">
  import siwiSleep from 'https://cdn.skypack.dev/siwi-sleep';
</script>

README

Build Status npm npm Github file size

siwi-sleep

sleep for nodejs

install

use npm

npm install siwi-sleep

use yarn

yarn add siwi-sleep

test

npm test

Example

(async () => {
    const { sleep } = require('siwi-sleep')
    while (true) {
        console.log(1)
        await sleep(1000)
    }
})()

console 1 sleep 1s