README
About
Sets delay in a specified process. Minimalistic one line function.
Install
npm i sleep-machine
Usage
const sleep = require('sleep-machine');
const delay = 1000; // milliseconds
(async () => {
for (let i = 0; i < 10; i++) {
await sleep(delay); // set delay
console.log(i);
}
})()