SemVer

external class SemVer(source)

Constructors

Link copied to clipboard
constructor(version: String)
constructor(version: String, optionsOrLoose: Boolean = definedExternally)
constructor(version: String, optionsOrLoose: RangeOptions = definedExternally)
constructor(version: SemVer)
constructor(version: SemVer, optionsOrLoose: Boolean = definedExternally)
constructor(version: SemVer, optionsOrLoose: RangeOptions = definedExternally)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var major: Int
Link copied to clipboard
var minor: Int
Link copied to clipboard
Link copied to clipboard
var patch: Int
Link copied to clipboard
Link copied to clipboard
var raw: String
Link copied to clipboard

Functions

Link copied to clipboard
fun compare(other: String): Int
fun compare(other: SemVer): Int

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

Link copied to clipboard
fun compareBuild(other: String): Int
fun compareBuild(other: SemVer): Int

Compares the build identifier of two versions.

Link copied to clipboard
fun compareMain(other: String): Int
fun compareMain(other: SemVer): Int

Compares the release portion of two versions.

Link copied to clipboard
fun comparePre(other: String): Int
fun comparePre(other: SemVer): Int

Compares the prerelease portion of two versions.

Link copied to clipboard
fun format(): String
Link copied to clipboard
fun inc(release: ReleaseType, identifier: String = definedExternally): SemVer
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String