is-comparator-valid

1.1.2 • Public • Published

is-comparator-valid Build Status Greenkeeper badge

Check if a semver comparator is valid

Install

$ npm install --save is-comparator-valid

Usage

var isValid = require('is-comparator-valid')
var Comparator = require('semver').Comparator
isValid(new Comparator('<2')) // => true
isValid(new Comparator('>0.0.0')) // => true
isValid(new Comparator('<0.0.0')) // => false

API

isValid(comparator) -> boolean

comparator

Required
Type: comparator

A semver.Comparator to test.

License

MIT © Ben Drucker

Package Sidebar

Install

npm i is-comparator-valid

Weekly Downloads

87

Version

1.1.2

License

MIT

Unpacked Size

2.86 kB

Total Files

4

Last publish

Collaborators

  • bendrucker