bin-version-check

Check whether a binary version satisfies a semver range

Renamed to binary-version-check: https://www.npmjs.com/package/binary-version-check
Last updated 7 months ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install bin-version-check 
SYNC missed versions from official npm registry.

bin-version-check

Check whether a binary version satisfies a semver range

Useful when you have a thing that only works with specific versions of a binary.

Install

npm install bin-version-check

Usage

$ curl --version
curl 7.30.0 (x86_64-apple-darwin13.0)
import binaryVersionCheck from 'bin-version-check';

try {
	await binaryVersionCheck('curl', '>=8');
} catch (error) {
	console.log(error);
	//=> 'InvalidBinaryVersion: curl 7.30.0 doesn't satisfy the version requirement of >=8'
}

API

binaryVersionCheck(binary, semverRange, options?)

binary

Type: string

Name or path of the binary to check.

semverRange

Type: string

Semver range to check against.

options

Type: object

args

Type: string[]
Default: ['--version']

CLI arguments used to get the binary version.

Related

Current Tags

  • 6.0.0                                ...           latest (7 months ago)

9 Versions

  • 6.0.0 [deprecated]           ...           7 months ago
  • 5.1.0                                ...           a year ago
  • 5.0.0                                ...           4 years ago
  • 4.0.0                                ...           6 years ago
  • 3.0.0                                ...           9 years ago
  • 2.1.0                                ...           10 years ago
  • 2.0.0                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
Maintainers (1)
Downloads
Total 2
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE