https://github.com/parro-it/semver-first-satisfied
Find minimum in an array of version that satisfies a semver range.
https://github.com/parro-it/semver-first-satisfied
Last synced: about 1 year ago
JSON representation
Find minimum in an array of version that satisfies a semver range.
- Host: GitHub
- URL: https://github.com/parro-it/semver-first-satisfied
- Owner: parro-it
- License: mit
- Created: 2016-01-21T22:05:45.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-29T14:00:49.000Z (over 10 years ago)
- Last Synced: 2024-10-02T15:07:17.731Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-micro-npm-packages-zh - semver-first-satisfied - 在满足semver范围的版本数组中找到最小值. (模块 / Semver)
- fucking-awesome-micro-npm-packages - semver-first-satisfied - Find minimum in an array of version that satisfies a semver range. (Modules / Semver)
- awesome-micro-npm-packages - semver-first-satisfied - Find minimum in an array of version that satisfies a semver range. (Modules / Semver)
- awesome-micro-npm-packages - semver-first-satisfied - Find minimum in an array of version that satisfies a semver range. (Modules / Semver)
README
# semver-first-satisfied
> Find minimum in an array of version that satisfies a semver range.
> Return the version string or null if no version in the arrya satisfy given range.
[](http://travis-ci.org/parro-it/semver-first-satisfied)
[](https://npmjs.org/package/semver-first-satisfied)
[](https://npmjs.org/package/semver-first-satisfied)
## Installation
```bash
npm install --save semver-first-satisfied
```
## Usage
```javascript
const firstSatisfied = require('semver-first-satisfied');
console.log(firstSatisfied('^1.1.0', ['0.5.0', '1.1.4', '1.2.3', '1.1.1']));
```
> '1.1.1'
## License
The MIT License (MIT)
Copyright (c) 2015 parro-it