Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell the version number of RxJS

How to tell the version of the installed RxJS from the code? For example:

var Rx = require('rxjs/Rx');
console.log(Rx.rev);   // undefined
console.log(Rx.version);  // undefined

Second question: How to tell if it's rxjs5 ?

like image 823
Sohail Si Avatar asked Sep 23 '16 15:09

Sohail Si


People also ask

What is the latest version of RXJS?

The latest version of RxJS is v6. It is version 6, which is released recently, and we are doing this tutorial in RxJS version 6. We know that RxJS is used to deal with reactive programming. It is common and most often used with Angular and ReactJS.

What version of RXJS do I need for angular 11?

First up, RxJS 7.4 is now the default for apps created with ng new. Existing apps using RxJS v6. x will have to manually update using the npm install [email protected] command. But why didn't angular updated their package.

How do I run a RXJS code?

import { of } from 'rxjs; import { map } from 'rxjs/operators'; map(x => x * x)(of(1, 2, 3)). subscribe((v) => console. log(`Output is: ${v}`)); When we go to execute the above code in command prompt, using command − node testrx.


2 Answers

This will show all NPM package versions if you installed with NPM.

npm list --depth=0

If you leave out the --depth then you'll get all their dependencies also.

like image 147
Preston Avatar answered Oct 01 '22 05:10

Preston


You can install the 'version-check' library from npm using

npm install -g version-check

And then call

version-check rxjs

Hope this solves your problem.

like image 29
Arpan Srivastava Avatar answered Oct 01 '22 05:10

Arpan Srivastava