{"name":"bin-version","version":"5.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"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["bin","binary","executable","version","semver","semantic","cli"],"dependencies":{"execa":"^5.0.0","find-versions":"^4.0.0"},"devDependencies":{"ava":"^2.4.0","tsd":"^0.14.0","xo":"^0.37.1"},"gitHead":"b92ac77b3c00f4eec36b6022a4e82fed6171c7f7","bugs":{"url":"https://github.com/sindresorhus/bin-version/issues"},"homepage":"https://github.com/sindresorhus/bin-version#readme","_id":"bin-version@5.0.0","_nodeVersion":"15.5.0","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-9vxfJ6Pe1OUiNlTV3HSDAMbcdR8TUrh71O7fN9cuoIztOIdBqC73pBwx0maLsPLqrmr0eB9bpfMiJBgUtW0jPA==","shasum":"5f9d9071c28f91f86f5b2631fb11651261160f12","tarball":"http://registry-npm.ywwl.com/bin-version/download/bin-version-5.0.0.tgz","fileCount":5,"unpackedSize":5605,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9qAeCRA9TVsSAnZWagAAOWEP/RS96y//nskZJVYp4g+K\nXpnLABH7WGVEThVGYl21kls7QVxeqKsKYJqKfdFN6qI7IGwmPpwQ9QFgabCz\nzqmi9PW61GpjYWzi1ZeoEk9i/xzdS7YY4AVCA47DdwqMTCOk6XbvfjG8hBv0\nksyhBk7/WUucCEBtYvSpcV7Qvffn/QkXbhthUkanbDirqThVIZOs55iPTZ1W\nMJhPzYKN6P9PZSsFTsMQ8j9rOw9Qz6xWGkMrxP7WLvLUXJif3NGU6p5Sj9QM\nSk9CZOpGHCuOdruz9VGEov94Y7kmmun86S0bX5NEKbGNSgWVdHwNeS1/lG/Y\nAJG9+7C4w6OZPoJkoAJeRNN7MbimVeUOQR3YWmnkwXPSh9UoWnr+oY4cWRle\ninn+Z8lKJf/2s79ACNPD0i1w0Ai8eK0iXMItFm9ufzRCanIOWqeaEXDfkwdx\najAl1KkvYhXfWaAW6mnxPto98ibwYd69tBHcb0T4fPXvglnkHrzHWUGEvFvX\nYTeqKeDWHDJWcJKd7iEJIL8HRb1cWIe5CMMXb/LIlXk4NycyOGehEPJ1lQX1\n8XXazBWYap8pFPInRCrqwfLVTJOpaCB284rW3sw2cTF7HKf4csRZ7eeI9B+v\nLC+vfSDAV1Q8AiwrBFNgyBIN3vMeIQBJ/ArX0aBeEzHgxy/c6RzsLbkbgtnX\nJUGO\r\n=k+ak\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvfYXbXtKYG0fI62RggdS18QqV7OUR+Zyj0vktZcoPpQIgah6ykjsEeJ2/GJaIiMc1EPVOwXk5ibzxZQPMsMAlQDo="}],"size":2449,"noattachment":false,"key":"/bin-version/-/bin-version-5.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bin-version_5.0.0_1609998365874_0.707746356579781"},"_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":1609998366030,"_cnpm_publish_time":1609998366030,"dist-tags":{"latest":"7.0.0"}}