VersionNumberNumberNumberNumberNumberVersionVersionVersionStringVersionSets the major, minor, and patch values from a semantic version string (e.g. 1.2.3)
Kind: Instance method of Version
Returns: Version - A reference to the class instance for method chaining.
| Param | Type | Description |
|---|---|---|
| version | String |
Parse this string (x.x.x) to a Version object |
NumberGet the major version value.
Kind: Instance method of Version
Returns: Number - The major version number.
NumberGet the minor version value.
Kind: Instance method of Version
Returns: Number - The minor version number.
NumberGet the patch version value
Kind: Instance method of Version
Returns: Number - The patch version number.
NumberTests if this version instance is between the supplied versions.
Kind: Instance method of Version
Returns: Number - Returns -1 if this number is not between minVersion and maxVersion or if minVersion is greater than maxVersion. 0 if the number is equal to either minVersion or maxVersion. 1 if the number is between the minVersion and maxVersion
| Param | Type | Description |
|---|---|---|
| minVersion | Version |
the lowest version to be used in the comparison |
| maxVersion | Version |
the highest version to be used in the comparison |
NumberMethod to test if this instance of Version is newer than the supplied one.
Kind: Instance method of Version
Returns: Number - 1 if this instance is newer, -1 if supplied version is newer, and 0 if they are equal
| Param | Type | Description |
|---|---|---|
| version | Version |
the version to check against |
VersionSet the major version value.
Kind: Instance method of Version
Returns: Version - A reference to the class instance for method chaining.
| Param | Type | Description |
|---|---|---|
| major | Number |
An integer for the major version value. |
VersionSet the minor version value.
Kind: Instance method of Version
Returns: Version - A reference to the class instance for method chaining.
| Param | Type | Description |
|---|---|---|
| minor | Number |
An integer for the minor version value. |