陈鹏铭 ac63ce6cb5 首次提交 1 年之前
..
LICENSE ac63ce6cb5 首次提交 1 年之前
README.md ac63ce6cb5 首次提交 1 年之前
index.js ac63ce6cb5 首次提交 1 年之前
package.json ac63ce6cb5 首次提交 1 年之前

README.md

semver-greatest-satisfied-range

NPM version Downloads Build Status AppVeyor Build Status Coveralls Status Gitter chat

Find the greatest satisfied semver range from an array of ranges.

Usage

var findRange = require('semver-greatest-satisfied-range');

var range = findRange('1.1.0', ['^1.0.0', '^1.1.0', '^1.2.0']);
// range === '^1.1.0'

API

findRange(version, rangeArray)

Takes a version and array of ranges, returns the greatest satisfied range. Range support is defined by sver-compat.

License

MIT