Nodejs HowTo detect OS version

Create a script to detect OS var async_exec = require(’child_process’).exec async_exec(’npm install shelljs’, function (err, stdout, stderr) {   require(’shelljs/global’);   var os = require(’os’);   echo(’Testing OS environment’);   /*     What platform you’re running on: ‘darwin’, ‘freebsd’, ‘linux’, ‘sunos’ or ‘win32’     win32 (for 32 or 64 bit)   */   …