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

rxjs-compat

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rxjs-compat

[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x) [![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs) [![Join the chat

  • 6.6.7
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
130K
decreased by-54.26%
Maintainers
1
Weekly downloads
 
Created

What is rxjs-compat?

The rxjs-compat package provides backward compatibility for RxJS 5.x codebases when upgrading to RxJS 6.x. It allows developers to use the old import paths and APIs while transitioning to the new version.

What are rxjs-compat's main functionalities?

Backward Compatibility

This feature allows you to use the old RxJS 5.x import paths and operators in your codebase. The code sample demonstrates how to import and use the `map` operator from RxJS 5.x in an RxJS 6.x environment.

import { Observable } from 'rxjs-compat/Observable';
import 'rxjs-compat/add/operator/map';

const observable = Observable.of(1, 2, 3).map(x => x * x);
observable.subscribe(value => console.log(value));

Operator Patching

This feature allows you to patch operators onto the Observable prototype, similar to how it was done in RxJS 5.x. The code sample demonstrates how to use the `filter` operator in an RxJS 6.x environment.

import { Observable } from 'rxjs-compat';
import 'rxjs-compat/add/operator/filter';

const observable = Observable.of(1, 2, 3, 4, 5).filter(x => x % 2 === 0);
observable.subscribe(value => console.log(value));

Static Methods

This feature allows you to use static methods like `of` from RxJS 5.x. The code sample demonstrates how to create an observable using the `of` static method.

import { Observable } from 'rxjs-compat/Observable';

const observable = Observable.of(1, 2, 3);
observable.subscribe(value => console.log(value));

Other packages similar to rxjs-compat

FAQs

Package last updated on 28 Mar 2021

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