{"name":"bin-version","version":"3.1.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":">=6"},"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":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"4dfad641a54ddf8629c0b4a1314f18d8af8904bf","bugs":{"url":"https://github.com/sindresorhus/bin-version/issues"},"homepage":"https://github.com/sindresorhus/bin-version#readme","_id":"bin-version@3.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==","shasum":"5b09eb280752b1bd28f0c9db3f96f2f43b6c0839","tarball":"http://registry-npm.ywwl.com/bin-version/download/bin-version-3.1.0.tgz","fileCount":5,"unpackedSize":4351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqdnrCRA9TVsSAnZWagAA350P/RACMKCR4UL5r9fVz9K9\nvXsCOlbLFKegQOlyoeofAC+fdHyNPCJj7M63kZXJTIsxE68oauSFicxOg5Ya\nOTOUC9xNphMVC4OJjGGfWAosu70r3oLAGS7p3iyNlOZgBI+i/r8ZQThv4E7u\nCYvRVQtmq0xPxVUh7rGvXgJLJYRjHVfRQWY/uroe85l/y14NST/S+OIyfCTm\nBSkMK44TCvHd9UGqpn0vpO0SmPOkshI1Gp+dVgj73VHdjzAMEYHX0sz3kQAC\nW3R0gq4wZXUJ4H0GHrW+A8RoWnyHypdS4N+iO+QCN+zyFHcUjDZ+l3IzFjrj\n9lSdZdTfnA9uowu3NLTOFRJ41wwLPoTBlIDgO0gUoZ90dPIZHrjamv4BAOVG\nW3pFdWzKkICHOfMZ8rB9UI3Z/1OuVgVoASZMZVzIgnepENqf0+i7kmX3wMGz\ndbHpe8Kc6C+c6iX0clb3ZdQRKJx4plw43tcNCqx5ECJAiUZn7ad0acU39Vct\nLBAAhABjiQhrrgGIJL/D0Lc/D0fwV5OBCGN8+MZ/xXgCjQoIjzlU75K/myb5\nyPzeTcDP1zt1ZhAWnNCM2BNt+8JhpW1BQ7kG+9Meffq1XHDfCc2pLQZmyC++\nfJRerVfuaSZk2IRI3ZBzMRmADLOGGevd1Cn/BiMZaJRaiIsxUVFDKm9wV+/t\n4CaL\r\n=CYS7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDb1CvRvP21RSiyYYH8xHwX/j/rkJBI69IKaV8gTSQGGwIgYi6tvVX3cC9B+Rs0UNCe/wDw2TEP+hY1vtBFdYBijMQ="}],"size":2131,"noattachment":false,"key":"/bin-version/-/bin-version-3.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bin-version_3.1.0_1554635242746_0.4241429704323605"},"_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":1554635242891,"_cnpm_publish_time":1554635242891,"dist-tags":{"latest":"7.0.0"}}