{"name":"bin-version","version":"6.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"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["binary","executable","version","semver","semantic","cli"],"dependencies":{"execa":"^5.0.0","find-versions":"^5.0.0"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.14.0","xo":"^0.39.1"},"gitHead":"cfa65894223f0c62b565021afaf6f3dc92200c57","bugs":{"url":"https://github.com/sindresorhus/bin-version/issues"},"homepage":"https://github.com/sindresorhus/bin-version#readme","_id":"bin-version@6.0.0","_nodeVersion":"16.0.0","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-nk5wEsP4RiKjG+vF+uG8lFsEn4d7Y6FVDamzzftSunXOoOcOOkzcWdKVlGgFFwlUQCj63SgnUkLLGF8v7lufhw==","shasum":"08ecbe5fc87898b441425e145f9e105064d00315","tarball":"http://registry-npm.ywwl.com/bin-version/download/bin-version-6.0.0.tgz","fileCount":5,"unpackedSize":5486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiSOiCRA9TVsSAnZWagAA2l0P/2K3Pminlet1IlMZxM2l\n4zcEiNGSUTkqNcjMHTiF5dzW1cFVzM0w0z+mLMosinBhrI3lGdLZo5BtFQp1\nzlQSyqVLhkTCDk/cK4MgM1l+oX+J0DyyIKvIAoqVf+N1rTOAiAHB5sMq6p05\nnLXMLmZK9AYt6BKXMuPXk8TBQ+6ZX4ukeS5rM5bGc+OzQnfsHIQru8teWC0H\nHUTxcXMv1LN5i5SSJGzrQcULr5l3MFdfuQ9Zm87bzhFKradJj6kMRmE1nped\nV90d3BP6WyjLkpm1ghBgvM9zopk1QoUpbn/eWl/O4i8HRx/DNIp1DzOAGQyG\nMiNl6TBxhjVYsKzO2LIedJuuhhypeZyebEE1HkNDPCC5s6jDaDMo8HejEAs5\nSHJirroo+xE7RByrMImHmkKjHBWxxYBV3WVWG/ExtNsucDKKsul5sfadEm3J\njFK0iBynfTrmnYKvqjs8/KVVZ1yT79FrsKzhIbcsOHPPBAzmqifuY6bbZIvK\n2dHmDwbcgrveBehhelUUAEbTlOxxiged63qz0YjREBKJxrNIR7r6Msy2yz2H\nniPeEIBTO4yIP6J88mMYuRLFe7xm8jLRHDsqPF7D0qQYMWU3ppgFphio0pZw\n9HvmoqG8TIQDUXX0OrF08jp/CVES01GPEod0+xVk2muAD2RsOGgD0clqk2B5\nEC2C\r\n=SvW7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/lHV2/wTGePfP5hcEvUQjP/pQ79BKIkDYJ5U7jwY07QIgTW83AoqLWrt8zfe2YcuVr9eaGJC0aaZqigDJfU8HNWs="}],"size":2390,"noattachment":false,"key":"/bin-version/-/bin-version-6.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bin-version_6.0.0_1619600290036_0.011366566020902358"},"_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":1619600290178,"_cnpm_publish_time":1619600290178,"dist-tags":{"latest":"7.0.0"}}