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 ?
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 ?
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.
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.
You could do something like:
const package = require('rxjs/package.json');
const is5 = /^5\./.test(package.version);
console.log(package.version);
console.log(is5);
Try and check on the list
ng --version