Class SemVerRange
An npm version range: ^1.2.3, ~1.2, >=1 <2, 1.x, 1.2.3 - 2,
* and || unions of those. Prerelease versions only match when a comparator in the same
set names a prerelease on the same major.minor.patch, as in node-semver.
public sealed class SemVerRange
- Inheritance
-
SemVerRange
- Inherited Members
Properties
Text
public string Text { get; }
Property Value
Methods
IsSatisfiedBy(SemVersion)
public bool IsSatisfiedBy(SemVersion version)
Parameters
versionSemVersion
Returns
MaxSatisfying(IEnumerable<SemVersion>)
public SemVersion? MaxSatisfying(IEnumerable<SemVersion> versions)
Parameters
versionsIEnumerable<SemVersion>
Returns
Parse(string)
public static SemVerRange Parse(string text)
Parameters
textstring
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
TryParse(string?, out SemVerRange?)
public static bool TryParse(string? text, out SemVerRange? range)
Parameters
textstringrangeSemVerRange