Version
Number
Number
Number
Number
Number
Version
Version
Version
String
Version
Sets 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 |
Number
Get the major version value.
Kind: Instance method of Version
Returns: Number
- The major version number.
Number
Get the minor version value.
Kind: Instance method of Version
Returns: Number
- The minor version number.
Number
Get the patch version value
Kind: Instance method of Version
Returns: Number
- The patch version number.
Number
Tests 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 |
Number
Method 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 |
Version
Set 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. |
Version
Set 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. |