I need in node.js function
result = execSync('node -v');
ps. Sync is wrong. I know. Just for personal use.
NodeJS 0.12 and IO.js 1.10 now support
You can now directly do this:
const execSync = require('child_process').execSync; code = execSync('node -v');
and it'll do what you expect. (Defaults to pipe the io results to the parent process). Note that you can also