Get the version of a binary in semver format
$ npm install --save bin-version
$ curl --version
curl 7.30.0 (x86_64-apple-darwin13.0)
var binVersion = require('bin-version');
binVersion('curl', function (err, version) {
console.log(version);
//=> 7.30.0
});
See the find-versions CLI.
MIT © Sindre Sorhus