ko-sleep

1.1.4 • Public • Published

ko-sleep

Build Status

A promise wrapper for setTimeout

usage

sleep(time: number | string): Promise<void>

time - millisecond number, or '1s' which https://www.npmjs.com/package/ms support

example

import sleep from 'ko-sleep'

await sleep(3 * 1000)
await sleep('3s')

license

MIT

Readme

Keywords

Package Sidebar

Install

npm i ko-sleep

Weekly Downloads

34,615

Version

1.1.4

License

MIT

Unpacked Size

3.54 kB

Total Files

6

Last publish

Collaborators

  • alsotang