Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

http-operators

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-operators

I'm starting work on a collection of useful RxJS operators. These operators are intended to be useful in the context of an Angular App where you have asynchronous data coming through RxJS, such as a standard Angular HttpClient GET or POST.

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19
decreased by-56.82%
Maintainers
1
Weekly downloads
 
Created
Source

HTTP Operators

I'm starting work on a collection of useful RxJS operators. These operators are intended to be useful in the context of an Angular App where you have asynchronous data coming through RxJS, such as a standard Angular HttpClient GET or POST.

How to use

  1. Import the operator you want to use
  2. Use it
  3. Profit

Example

import { cacheAndShare, keepFresh, retryExponentialBackoff } from 'http-operators';

...

constructor(http: HttpClient) {
    this.data$ = http.get<MyDataType>(pathToAPI).pipe(
            // Retry at most 5 times, starting with a 1 second wait
            retryExponentialBackoff(5, 1000),

            // Keep Fresh every 5 minutes
            keepFresh(1000 * 60 * 5),

            // Cache in localStorage['repos']
            shareAndCache('repos'),
    );
}

FAQs

Package last updated on 19 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc