You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <p align="center">
  2. <a href="http://gulpjs.com">
  3. <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
  4. </a>
  5. </p>
  6. # semver-greatest-satisfied-range
  7. [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
  8. Find the greatest satisfied semver range from an array of ranges.
  9. ## Usage
  10. ```js
  11. var findRange = require('semver-greatest-satisfied-range');
  12. var range = findRange('1.1.0', ['^1.0.0', '^1.1.0', '^1.2.0']);
  13. // range === '^1.1.0'
  14. ```
  15. ## API
  16. ### `findRange(version, rangeArray)`
  17. Takes a version and array of ranges, returns the greatest satisfied range. Range support is defined by [sver-compat][range-support].
  18. ## License
  19. MIT
  20. [range-support]: https://github.com/phated/sver-compat#range-support
  21. [downloads-image]: http://img.shields.io/npm/dm/semver-greatest-satisfied-range.svg
  22. [npm-url]: https://www.npmjs.com/package/semver-greatest-satisfied-range
  23. [npm-image]: http://img.shields.io/npm/v/semver-greatest-satisfied-range.svg
  24. [travis-url]: https://travis-ci.org/gulpjs/semver-greatest-satisfied-range
  25. [travis-image]: http://img.shields.io/travis/gulpjs/semver-greatest-satisfied-range.svg?label=travis-ci
  26. [appveyor-url]: https://ci.appveyor.com/project/gulpjs/semver-greatest-satisfied-range
  27. [appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/semver-greatest-satisfied-range.svg?label=appveyor
  28. [coveralls-url]: https://coveralls.io/r/gulpjs/semver-greatest-satisfied-range
  29. [coveralls-image]: http://img.shields.io/coveralls/gulpjs/semver-greatest-satisfied-range/master.svg
  30. [gitter-url]: https://gitter.im/gulpjs/gulp
  31. [gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg