compare
external fun compare(v1: String, v2: String, optionsOrLoose: Boolean = definedExternally): Int(source)
external fun compare(v1: String, v2: String, optionsOrLoose: Options = definedExternally): Int(source)
external fun compare(v1: String, v2: SemVer, optionsOrLoose: Boolean = definedExternally): Int(source)
external fun compare(v1: String, v2: SemVer, optionsOrLoose: Options = definedExternally): Int(source)
external fun compare(v1: SemVer, v2: String, optionsOrLoose: Boolean = definedExternally): Int(source)
external fun compare(v1: SemVer, v2: String, optionsOrLoose: Options = definedExternally): Int(source)
external fun compare(v1: SemVer, v2: SemVer, optionsOrLoose: Boolean = definedExternally): Int(source)
external fun compare(v1: SemVer, v2: SemVer, optionsOrLoose: Options = definedExternally): Int(source)
Compares two versions excluding build identifiers (the bit after +
in the semantic version string).
Sorts in ascending order when passed to Array.sort()
.
Return
0
ifv1
==v2
1
ifv1
is greater-1
ifv2
is greater.