Sohail Si Sohail Si - 1 year ago 69
Node.js Question

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 ?

Answer Source

You could do something like:

const package = require('rxjs/package.json');
const is5 = /^5\./.test(package.version);

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download