{"_id":"binary-version","name":"binary-version","dist-tags":{"latest":"7.1.0"},"versions":{"7.1.0":{"name":"binary-version","version":"7.1.0","description":"Get the version of a binary in semver format","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/binary-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":"fccce97e869a2bd114047342868c8b7fcd4aac09","bugs":{"url":"https://github.com/sindresorhus/binary-version/issues"},"homepage":"https://github.com/sindresorhus/binary-version#readme","_id":"binary-version@7.1.0","_nodeVersion":"18.19.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-Iy//vPc3ANPNlIWd242Npqc8MK0a/i4kVcHDlDA6HNMv5zMxz4ulIFhOSYJVKw/8AbHdHy0CnGYEt1QqSXxPsw==","shasum":"672f045628e6cd416a2292d4c1e06567f7e560cc","tarball":"https://registry.npmjs.org/binary-version/-/binary-version-7.1.0.tgz","fileCount":5,"unpackedSize":5680,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD19fxEYxVLi4cT9eyK05QUJhrAPih//Xbcevz1m4h4gQIgND6OxBPBhQlk8h5IFvaShPuV6EAA0zOzbolXLHvz7uw="}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/binary-version_7.1.0_1712132802297_0.6959682270671386"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-03T08:26:42.297Z","7.1.0":"2024-04-03T08:26:42.461Z","modified":"2024-04-03T08:26:42.723Z"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"description":"Get the version of a binary in semver format","homepage":"https://github.com/sindresorhus/binary-version#readme","keywords":["binary","executable","version","semver","semantic","cli"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/binary-version.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/binary-version/issues"},"license":"MIT","readme":"# binary-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 binary-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 'binary-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 'binary-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 'binary-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- [binary-version-cli](https://github.com/sindresorhus/binary-version-cli) - CLI for this module\n- [find-versions](https://github.com/sindresorhus/find-versions) - Find semver versions in a string\n","readmeFilename":"readme.md"}