Buckets:
| const SemVer = require('../classes/semver') | |
| const Range = require('../classes/range') | |
| const maxSatisfying = (versions, range, options) => { | |
| let max = null | |
| let maxSV = null | |
| let rangeObj = null | |
| try { | |
| rangeObj = new Range(range, options) | |
| } catch (er) { | |
| return null | |
| } | |
| versions.forEach((v) => { | |
| if (rangeObj.test(v)) { | |
| // satisfies(v, range, options) | |
| if (!max || maxSV.compare(v) === -1) { | |
| // compare(max, v, true) | |
| max = v | |
| maxSV = new SemVer(max, options) | |
| } | |
| } | |
| }) | |
| return max | |
| } | |
| module.exports = maxSatisfying | |
Xet Storage Details
- Size:
- 593 Bytes
- Xet hash:
- bf7d2ba378cf75b95bc256cf1baedb79f3905c30d835ebbbf9bb64faa7d3c1a5
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.