1.0.0 • Published 2 years ago

fetch-polling v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Fetch-polling

Simple fetch polling

Get started

yarn add fetch-polling
import FetchPolling from 'fetch-polling'

const fetchFunc = () => {
  return fetch('https://api.github.com/repos/xuerzong/fetch-polling').then(res => res.json())
}

const options = {
  fetch: fetchFunc,
  delay: 500 /* ms */
}

const fetchPolling = new FetchPolling(options)

fetchPolling.start()

License

MIT

1.0.0

2 years ago

0.1.0

2 years ago