Package Exports
- semver-existing-max
- semver-existing-max/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (semver-existing-max) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
semver-existing-max
Find the maximum version of the given version range that exists in dependency or version list.
Install
$ npm i semver-existing-maxor
$ yarn add semver-existing-maxUsage
Passing dependency name in the argument:
const semverExistingMax = require('semver-existing-max');
const result = await semverExistingMax('semver', '~1.0.5');
// => result = 1.0.14Or passing version list in the argument:
const semverExistingMax = require('semver-existing-max');
const versionList = ['1.0.4', '1.0.5', '1.0.6', '1.0.7', '1.1.2'];
const result = await semverExistingMax(versionList, '~1.0.5');
// => result = 1.0.7API
semverExistingMax('dependency name or version list', 'version range')
Return the maximum version of the given version range that exists in the dependency or version list.
Related
License
MIT