rx-fetchable
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

rx-fetchable

A cancellable fetch observable. Uses rxjs and isomorphic-fetch

Install

npm i rx-fetchable

Usage

import rxFetchable from "rx-fetchable";
import { mergeMap } from "rxjs/operators";
 
rxFetchable("http://ifconfig.co/json")
  .pipe(mergeMap(resp => resp.json()))
  .subscribe(ipInfo => console.log(`Your IP is: ${ipInfo.ip}`)))();

Readme

Keywords

none

Package Sidebar

Install

npm i rx-fetchable

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

4.67 kB

Total Files

5

Last publish

Collaborators

  • ryanhirsch