【文件属性】:
文件名称:gallup:使用ES6 Promises和流轮询任何资源
文件大小:40KB
文件格式:ZIP
更新时间:2021-04-28 22:23:33
JavaScript
使用ES6 Promises和流轮询任何资源。
安装
$ npm install gallup --save
用法
import Gallup from 'gallup'
// You construct a poller by providing a poll callback as the first argument
// and an optional options object as the second. The poll function may return a
// normal value or an ES6 Promise to be evaluated.
var poller = new Gallup ( ( ) => {
return Promise . resolve ( { stub : 'data' } )
} , 5000 ) // poll e
【文件预览】:
gallup-master
----.gitignore(673B)
----package.json(1KB)
----resources()
--------logo.sketch(64KB)
--------prepublish.sh(461B)
--------logo.png(13KB)
----.travis.yml(86B)
----LICENSE(1KB)
----README.md(2KB)
----lib()
--------__tests__()
--------gallup.js(1KB)
----.npmignore(714B)