compareBuild

external fun compareBuild(a: String, b: String): Int(source)
external fun compareBuild(a: String, b: String, optionsOrLoose: Boolean = definedExternally): Int(source)
external fun compareBuild(a: String, b: String, optionsOrLoose: Options = definedExternally): Int(source)
external fun compareBuild(a: String, b: SemVer): Int(source)
external fun compareBuild(a: String, b: SemVer, optionsOrLoose: Boolean = definedExternally): Int(source)
external fun compareBuild(a: String, b: SemVer, optionsOrLoose: Options = definedExternally): Int(source)
external fun compareBuild(a: SemVer, b: String): Int(source)
external fun compareBuild(a: SemVer, b: String, optionsOrLoose: Boolean = definedExternally): Int(source)
external fun compareBuild(a: SemVer, b: String, optionsOrLoose: Options = definedExternally): Int(source)
external fun compareBuild(a: SemVer, b: SemVer): Int(source)
external fun compareBuild(a: SemVer, b: SemVer, optionsOrLoose: Boolean = definedExternally): Int(source)
external fun compareBuild(a: SemVer, b: SemVer, optionsOrLoose: Options = definedExternally): Int(source)

Compares two versions including build identifiers (the bit after + in the semantic version string).

Sorts in ascending order when passed to Array.sort().

Return

  • 0 if v1 == v2

  • 1 if v1 is greater

  • -1 if v2 is greater.

Since

6.1.0