2.0.0 • Published 7 years ago
psleep v2.0.0
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!')
}