{"name":"bin-version","version":"2.0.0","description":"Get the version of a binary in semver format","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/bin-version"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["bin","binary","executable","version","semver","semantic","cli"],"dependencies":{"execa":"^0.1.1","find-versions":"^2.0.0"},"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"185b7dcbf1e023b2741f64793a18189f98f4c749","bugs":{"url":"https://github.com/sindresorhus/bin-version/issues"},"homepage":"https://github.com/sindresorhus/bin-version","_id":"bin-version@2.0.0","_shasum":"2cc95d83b522bdef2e99978e76aeb5491c8114ff","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"2cc95d83b522bdef2e99978e76aeb5491c8114ff","tarball":"http://registry-npm.ywwl.com/bin-version/download/bin-version-2.0.0.tgz","integrity":"sha512-JGeWLcO8hOmwVNkp7/UlvkmpzsO2QTszAI/wzkRw/a/qkrjYoRPXWWluvFxv59fmwWzLrKpA6HorMF78QFnqew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrmp/0Z7YwSDKOgDOQiFWHAlyq27YJGJ393mBSH0U2HwIgbVTpaIb5N6Q7s+GyL8myl+quuWpIAy6B740aTOgtjps="}],"size":1781,"noattachment":false,"key":"/bin-version/-/bin-version-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"readme":"# bin-version\n\n> Get the version of a binary in [semver](https://github.com/npm/node-semver) format\n\n## Install\n\n```sh\nnpm install bin-version\n```\n\n## Usage\n\n```console\n$ curl --version\ncurl 7.30.0 (x86_64-apple-darwin13.0)\n```\n\n```js\nimport binaryVersion from 'bin-version';\n\nconsole.log(await binaryVersion('curl'));\n//=> '7.30.0'\n```\n\n```console\n$ openssl version\nOpenSSL 1.0.2d 9 Jul 2015\n```\n\n```js\nimport binaryVersion from 'bin-version';\n\nconsole.log(await binaryVersion('openssl'));\n//=> '1.0.2'\n```\n\n```console\n$ openssl version\nOpenSSL 1.0.2d 9 Jul 2015\n```\n\n```js\nimport binaryVersion from 'bin-version';\n\nconsole.log(await binaryVersion('openssl', {args: ['version']}));\n//=> '1.0.2'\n```\n\n## API\n\n### binaryVersion(binary, options?)\n\nReturns a `Promise<string>` with the version of the `binary`.\n\n#### binary\n\nType: `string`\n\nThe name of or path to the binary to get the version from.\n\n#### options\n\nType: `object`\n\n##### args\n\nType: `string[]`\n\nThe arguments to pass to `binary` so that it will print its version.\n\nIf not specified, predefined arguments will be used for known binaries, or `['--version']` and `['version']` arguments will be tried.\n\n## Related\n\n- [bin-version-cli](https://github.com/sindresorhus/bin-version-cli) - CLI for this module\n- [find-versions](https://github.com/sindresorhus/find-versions) - Find semver versions in a string\n","publish_time":1449920100534,"_cnpm_publish_time":1449920100534,"dist-tags":{"latest":"7.0.0"}}