{"name":"bin-version","version":"4.0.0","description":"Get the version of a binary in semver format","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/bin-version.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["bin","binary","executable","version","semver","semantic","cli"],"dependencies":{"execa":"^1.0.0","find-versions":"^3.0.0"},"devDependencies":{"ava":"^2.1.0","tsd":"^0.7.3","xo":"^0.24.0"},"gitHead":"7b076eee10c33c9553cd1dec608b4cd050187223","bugs":{"url":"https://github.com/sindresorhus/bin-version/issues"},"homepage":"https://github.com/sindresorhus/bin-version#readme","_id":"bin-version@4.0.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-oxhcQ8KmmZZS+nNFDw2v3VP1ztAOpKWRygBeZNVHKOQuhHNwDY6coNFo6oxxMhhmfPZMiSC8ewgTxWviFvYSyg==","shasum":"e9366b57ba83077364ecf2097a946891086a4008","tarball":"http://registry-npm.ywwl.com/bin-version/download/bin-version-4.0.0.tgz","fileCount":5,"unpackedSize":5709,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBREHCRA9TVsSAnZWagAA634QAIomvgfkHVgar2gF6gv6\neAVJxLwgrmAodZNoF0FJN1ij+Gr1CTy0Bhfq8uqCYXML9Nfbun/4nqtVI4HN\nDE3twPkkO+8sSTozAAriRca/w//H2HIEMKvdrc6oMKnJvwuzApqdbLvzy0N4\nRkYlPdnJyfBhHeyVaufThS/sM6K42XuNMA4lMyBcQAY8gg4zfRe5OVHbcRN+\nfwtN9JfunZHq2BGGru9OuhbbOdmocUXn5XA+U6U9gmzPqW4LLnq+qU7DN6RJ\neI6Lv+hG4amv/mwtK8p6TL9Fjdpgvb80OVAbXWng3z1uyoxmXHB0HyAAzkTa\nxMqdnKV6Omi4hpi6b7PZd9tC2HVxuz4LCCAQGS6EOlvTSZWBuuUaLD+nKnXO\nHA8bHgr4kkP5cCAZg8v6MvE9FD2N61aFgM56PlLv71JlgM/WjYLsY3EAbOTC\n0+3V4MfdWfaUEPsg1xktvcyIti6642yqyUCBo37I6793ErIR3gPqfGeXIqwK\nUsHyes9B2yFk+w0wB7oGsRRV/SLuEwRF6SY1FJ9uBMFmPubtXzHf4z9tynUl\n5BRAfkIngzx6781xL5v4TPtZ9Vod+N4HMVIw4g3kX2DXY3dDqg8oJZEpY8jY\nJrVeu4Hn0BpHvxyUrHrFqxzpuRprf+55U04Q7DtTnBvqAtR3FCKteiOqlFOL\nynnN\r\n=bU+h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBuixkGuKYdgksCd1fGGiWhrwzIkXCNrz4OOtcOTWYvhAiAJkvPkQReajd2kb+65XSg6BIVqjOgBTUlcrtVqJAwEzA=="}],"size":2490,"noattachment":false,"key":"/bin-version/-/bin-version-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bin-version_4.0.0_1560613126719_0.9679342095025767"},"_hasShrinkwrap":false,"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":1560613126877,"_cnpm_publish_time":1560613126877,"dist-tags":{"latest":"7.0.0"}}