semver-match
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

NPM Package Build Status

Semver Match

A simple function that conforms npm package version matching behavior.

Install

npm install semver-match --save

Usage

import match from 'semver-match';
 
match('^0.1.0', ['0.1.0', '0.1.1', '0.2.0']); // "0.1.1"
match('*', ['0.1.0', '0.2.0'], { latest: '0.1.0' }); // "0.1.0"
match('next', ['0.1.0', '0.2.0'], { latest: '0.1.0', next: '0.2.0' }); // "0.2.0"

License

MIT License.

/semver-match/

    Package Sidebar

    Install

    npm i semver-match

    Weekly Downloads

    36,837

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • vilicvane