{"name":"bin-version","version":"7.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":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["binary","executable","version","semver","semantic","cli"],"dependencies":{"execa":"^8.0.1","find-versions":"^6.0.0"},"devDependencies":{"ava":"^6.1.2","tsd":"^0.31.0","xo":"^0.58.0"},"xo":{"ignores":["fixture"]},"types":"./index.d.ts","gitHead":"9f68fd4fd8ebed87c501ad707cccf813aaed0afd","bugs":{"url":"https://github.com/sindresorhus/bin-version/issues"},"homepage":"https://github.com/sindresorhus/bin-version#readme","_id":"bin-version@7.0.0","_nodeVersion":"18.19.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-S0FCw4v7JhTvKpWW7uCl7COKhZ5vUstkDTtOAdyLdcdhtt4INQ68+il2N7T6z4i+jFGBwD91eY+g+yWCxwi5AQ==","shasum":"1b709fb191bfaaa911f759ebcbe066b43c6e575a","tarball":"http://registry-npm.ywwl.com/bin-version/download/bin-version-7.0.0.tgz","fileCount":5,"unpackedSize":5650,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDNpiDCCDAELUM8xBT1tOMuXJJUCdSErefLjKhMvQdCAIgRrsuoRRBCL2ehf0rK0c1qC+PRKHu7d4lRFf1Hc27Qf0="}],"size":2468,"noattachment":false,"key":"/bin-version/-/bin-version-7.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bin-version_7.0.0_1712132636884_0.914778308601665"},"_hasShrinkwrap":false,"deprecated":"Renamed to binary-version: https://www.npmjs.com/package/binary-version","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":1712132637040,"_cnpm_publish_time":1712132637040,"dist-tags":{"latest":"7.0.0"}}