$ npm install ko-sleep
A promise wrapper for setTimeout
sleep(time: number | string): Promise<void>
time - millisecond number, or '1s' which https://www.npmjs.com/package/ms support
import sleep from 'ko-sleep'
await sleep(3 * 1000)
await sleep('3s')
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE