{"_id":"binary-version-check","name":"binary-version-check","dist-tags":{"latest":"6.1.0"},"versions":{"6.1.0":{"name":"binary-version-check","version":"6.1.0","description":"Check whether a binary version satisfies a semver range","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/binary-version-check.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava"},"keywords":["cli","binary","executable","version","semver","semantic","range","satisfy","check","validate"],"dependencies":{"binary-version":"^7.1.0","semver":"^7.6.0","semver-truncate":"^3.0.0"},"devDependencies":{"ava":"^6.1.2","xo":"^0.58.0"},"gitHead":"7aef4a6120c1d45b80414e50742fa22a769aa91d","bugs":{"url":"https://github.com/sindresorhus/binary-version-check/issues"},"homepage":"https://github.com/sindresorhus/binary-version-check#readme","_id":"binary-version-check@6.1.0","_nodeVersion":"18.19.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-REKdLKmuViV2WrtWXvNSiPX04KbIjfUV3Cy8batUeOg+FtmowavzJorfFhWq95cVJzINnL/44ixP26TrdJZACA==","shasum":"5db7b0199dd32cdc35cada48d7535c5c1c169dcd","tarball":"https://registry.npmjs.org/binary-version-check/-/binary-version-check-6.1.0.tgz","fileCount":4,"unpackedSize":3816,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBRC9k9vEKDxMUMuQ/3MSovprD7Hw6MkO1ERiUMpMdMlAiA15SN8hu7DlTYiXg9Fsl3cYeeQR1Ly7WqzMLdyGhQg1A=="}]},"_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-check_6.1.0_1712134329251_0.32902531379783984"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-03T08:52:09.250Z","6.1.0":"2024-04-03T08:52:09.469Z","modified":"2024-04-03T08:52:09.725Z"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"description":"Check whether a binary version satisfies a semver range","homepage":"https://github.com/sindresorhus/binary-version-check#readme","keywords":["cli","binary","executable","version","semver","semantic","range","satisfy","check","validate"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/binary-version-check.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/binary-version-check/issues"},"license":"MIT","readme":"# binary-version-check\n\n> Check whether a binary version satisfies a [semver range](https://github.com/npm/node-semver#ranges)\n\nUseful when you have a thing that only works with specific versions of a binary.\n\n## Install\n\n```sh\nnpm install binary-version-check\n```\n\n## Usage\n\n```console\n$ curl --version\ncurl 7.30.0 (x86_64-apple-darwin13.0)\n```\n\n```js\nimport binaryVersionCheck from 'binary-version-check';\n\ntry {\n\tawait binaryVersionCheck('curl', '>=8');\n} catch (error) {\n\tconsole.log(error);\n\t//=> 'InvalidBinaryVersion: curl 7.30.0 doesn't satisfy the version requirement of >=8'\n}\n```\n\n## API\n\n### binaryVersionCheck(binary, semverRange, options?)\n\n#### binary\n\nType: `string`\n\nThe name or path of the binary to check.\n\n#### semverRange\n\nType: `string`\n\nThe [semver range](https://github.com/npm/node-semver#ranges) to check against.\n\n#### options\n\nType: `object`\n\n##### args\n\nType: `string[]`\\\nDefault: `['--version']`\n\nThe CLI arguments used to get the binary version.\n\n## Related\n\n- [binary-version-check-cli](https://github.com/sindresorhus/binary-version-check-cli) - CLI for this package\n","readmeFilename":"readme.md"}