Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
rxjs-compat
Advanced tools
This package is required to get backwards compatibility with RxJS pervious to version 6. It contains the imports to add operators to `Observable.prototype` and creation methods to `Observable`. This is what allows, for instance, dot-chaining:
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.
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));
RxJS (Reactive Extensions for JavaScript) is a library for reactive programming using Observables, to make it easier to compose asynchronous or callback-based code. RxJS 6.x is the latest version and includes a new modular architecture, improved performance, and better debugging capabilities. Unlike rxjs-compat, it does not provide backward compatibility for RxJS 5.x code.
Bacon.js is a functional reactive programming library for JavaScript. It provides similar functionalities to RxJS, such as event streams and property values, but with a different API and approach. Bacon.js focuses on simplicity and ease of use, whereas RxJS offers a more comprehensive set of operators and features.
Most.js is a reactive programming library that focuses on high performance and minimalism. It provides a small but powerful set of operators for working with streams. Most.js is designed to be fast and efficient, making it suitable for performance-critical applications. Unlike rxjs-compat, it does not offer backward compatibility for older versions of RxJS.
This package is required to get backwards compatibility with RxJS pervious to version 6. It contains the imports to add operators to Observable.prototype
and creation methods to Observable
. This is what allows, for instance, dot-chaining:
Observable.interval(1)
.map(i => i * i)
vs
Observable.interval(1)
.pipe(map(i => i * i))
FAQs
[![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
The npm package rxjs-compat receives a total of 119,719 weekly downloads. As such, rxjs-compat popularity was classified as popular.
We found that rxjs-compat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.