This package has been deprecated
Author message:
Development of this module has been stopped.
pause-promise
1.0.6 • Public • Published pause
Simple promise wrapper around setImmediate
, setTimeout
.
Why?
Useful when needing to suspend generator or async functions without doing anything.
const pause = require('pause-promise')
async test () {
const elements = await getSomeArray()
for (const element of elements) {
await pause(50)
}
}
test()
/pause-promise/
//
Package Sidebar
Install
Weekly Downloads