siwi-wait

1.0.2 • Public • Published

Build Status npm npm Github file size

siwi-wait

阻塞执行 在异步函数中等待指定时间

install

use npm

npm install siwi-wait

use yarn

yarn add siwi-wait

Example

const wait = require('siwi-wait')
 
class Example {
    constructor() {
        this.init()
    }
    async init () {
        await wait(10000)
        console.log(1)
    }
}
 
module.exports = new Example()

等待10秒后输出 1

Package Sidebar

Install

npm i siwi-wait

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

62.5 kB

Total Files

8

Last publish

Collaborators

  • siwi