poll-until-promise:重试,直到诺言成功

时间:2021-05-02 20:35:17
【文件属性】:
文件名称:poll-until-promise:重试,直到诺言成功
文件大小:124KB
文件格式:ZIP
更新时间:2021-05-02 20:35:17
JavaScript 投票直到承诺 等待直到已执行的承诺解析为真实值,然后每x毫秒执行一次,并在y毫秒后停止。 安装 npm install poll-until-promise 用法 正在撷取资料 const { waitFor } = require ( 'poll-until-promise' ) ; waitFor ( ( ) => fetch ( '/get-data' ) , { interval : 100 } ) // Tries every 100ms (from the last failure) . then ( value => console . log ( 'Yey' , value ) ) . catch ( err => console . error ( err ) ) ; 等待成功 const { waitFor } = require ( 'pol
【文件预览】:
poll-until-promise-master
----.travis.yml(193B)
----.eslintrc(170B)
----example()
--------index.html(747B)
----index.js(54B)
----package.json(2KB)
----test()
--------.eslintrc(106B)
--------poll-until-promise.spec.js(10KB)
----package-lock.json(488KB)
----src()
--------poll-until-promise.js(4KB)
----.gitignore(89B)
----webpack.config.js(648B)
----lib()
--------poll-until-promise.js(4KB)
--------poll-until-promise.js.map(13KB)
----README.md(3KB)

网友评论