Reputation: 16964
There are now several forks of nodejs for various reasons.
For my node code to see which fork it is running under, what is currently the best way?
The forks I am aware of are:
(I've also asked a companion question about detecting which JS engine is being used. This question is only about detecting which fork is being used.)
Upvotes: 1
Views: 214
Reputation: 4005
NodeJS and iojs can be probably checked by process.release :
name: a string with a value that will always be 'node' for Node.js. For legacy io.js releases, this will be 'io.js'.
As for JXcore you can use either process.jxversion
or typeof jxcore !== 'undefined'
Upvotes: 4