promsleep - Sleep as a promise
This is a small handy piece of code that implements sleep as a promise.
Example
Promise.resolve()
.then(out => promsleep(1000/*ms*/, out)
.then(out => {
/* out will be passed through promsleep */
})
This is a small handy piece of code that implements sleep as a promise.
Promise.resolve()
.then(out => promsleep(1000/*ms*/, out)
.then(out => {
/* out will be passed through promsleep */
})
npm i promsleep
0
1.0.0
MIT
1.81 kB
4