What might my node.js code look like if it runs under official nodejs, iojs, jxcore or node-chakracore?

There are currently several nodejs forks for various reasons.

For my node code, to see which one works under it, what is currently the best way?

The forks that I know of are as follows:

  • Official nodejs release
  • iojs - I think now it is out of date since it returned to the official site, but it is still interesting
  • JXcore - a fork that supports multiple processors / core; several JS engines, including V8, Mozilla SpiderMonkey and Microsoft ChakraCore; and packaging js applications, so npm does not need to be used by application users.
  • Microsoft fork nodejs using its Edge ChakraCore JS browser using V8 compatible pads

( I also asked a question about which JS engine is being used. This question only concerns determining which plug is being used.)

+1
chakra jxcore iojs
source share
1 answer

NodeJS and iojs can probably be 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'

+4
source share

All Articles