psleep
v2.0.0
Published
Resolve a promise after some time. Good for async/await.
Downloads
4
Readme
psleep
DEAR GOD DON'T USE THIS USE delay
WITH ms
INSTEAD
Resolve a promise after some time. Good for async/await.
basically the delay module with the ms module built in
Uses the ms module for millisecond conversion, if supplied argument is a string.
import psleep from 'psleep'
async function doThings () {
console.log('hello...')
await psleep('10 seconds') // waits 10 seconds
await psleep(2000) // waits 2 seconds
console.log('world!')
}