Version

Represents the version number

Constructor
Version(major: number = 0, minor: number = 0, build: number = 0, revision: number = 0)

Construct a Version object from major, minor, build, revision number

Parameters
major Value of the major component. Default: 0
minor Value of the minor component. Default: 0
build Value of the build component. Default: 0
revision Value of the revision component. Default: 0
Version(versionString: string)

Construct a Version object from version string

Parameters
versionString Version string. Ex: "1.2.3.4"
Methods
major
number major()

Get the value of the major component

minor
number minor()

Get the value of the minor component

build
number build()

Get the value of the build component

revision
number revision()

Get the value of the revision component

compare
number compare(version: Version | string)

Compare with another Version. < 0 is lower, 0 is equal, > 0 is higher

Parameters
version The Version object or version string
Return
number < 0 is lower, 0 is equal, > 0 is higher

© 2021 - Macrorify by KoK-CODE