tallbag-from-fetch

1.0.5 • Public • Published

tallbag-from-fetch

Basically RxJS's fromFetch converted to a tallbag listenable source.

AbortController is required for this implementation to work and use cancellation appropriately

npm install tallbag-from-fetch

example

import pipe from 'tallbag-pipe'
import fromFetch from 'tallbag-from-fetch'
import observe from 'callbag-observe'
 
pipe(
  fromFetch('https://api.github.com/users?per_page=5'),
  map(response => response.json()),
  observe(async data => console.log(await data))
) // [{...}, {...}, {...}, {...}, {...}]

Readme

Keywords

Package Sidebar

Install

npm i tallbag-from-fetch

Weekly Downloads

3

Version

1.0.5

License

MIT

Unpacked Size

3.94 kB

Total Files

4

Last publish

Collaborators

  • drejohnson