node.js - How to detect from nodejs which JavaScript engine it is running on? -


there several forks of nodejs , of them support javascript engines other google's v8 engine.

for node code see js engine running under, best way?

the engines aware of are:

  • google's v8 - engine supported official node.js , iojs fork. 1 of engines supported jxcore.
  • mozilla's spidermonkey - 1 of engines supported jxcore.
  • microsoft's chakracore - engine supported microsoft's port of node.js , apparently 1 of engines supported jxcore though haven't got 1 work yet.

(i've asked separate question detecting fork of nodejs being used. question detecting js engine.)

the process object contains lot of information running process (in case, node).

my process.versions example, contains current version of v8:

process: {     versions: {         http_parser: '2.5.0',         node: '4.2.4',         v8: '4.5.103.35',         uv: '1.7.5',         zlib: '1.2.8',         ares: '1.10.1-dev',         icu: '56.1',         modules: '46',         openssl: '1.0.2e'     } } 

you should able query object , determine current engine.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -