time-sleep
v1.0.2
Published
JavaScript sleep function
Downloads
747
Readme
sleep
JavaScript sleep function
Install
Install with npm:
$ npm install --save time-sleep
Usage
import sleep from 'time-sleep'
const test = async function() {
console.log(1)
await sleep(1000)
console.log(2)
await sleep(1000)
console.log(3)
}
test()