-
-
Notifications
You must be signed in to change notification settings - Fork 3
SemVer.js
SemVer module
Author: William Leemans
Copyright: William Leemans 2024
-
SemVer
-
.semVer
-
.parseSemanticVersion(version) ⇒
Array
-
.eq(source, target) ⇒
boolean
-
.ne(source, target) ⇒
boolean
-
.gt(source, target) ⇒
boolean
-
.gte(source, target) ⇒
boolean
-
.lt(source, target) ⇒
boolean
-
.lte(source, target) ⇒
boolean
-
.parseSemanticVersion(version) ⇒
-
.semVer
A simple class to compare semantic version strings
Kind: static class of SemVer
-
.semVer
-
.parseSemanticVersion(version) ⇒
Array
-
.eq(source, target) ⇒
boolean
-
.ne(source, target) ⇒
boolean
-
.gt(source, target) ⇒
boolean
-
.gte(source, target) ⇒
boolean
-
.lt(source, target) ⇒
boolean
-
.lte(source, target) ⇒
boolean
-
.parseSemanticVersion(version) ⇒
Parse the given semantic version and return an Array with version information
Kind: static method of semVer
Returns: Array
- [major, minor, bugfix, all other]
Param | Type | Description |
---|---|---|
version | string |
A semantically correct version |
Check if both given versions are the same
Kind: static method of semVer
Returns: boolean
- Whether or not the versions are identical
Param | Type | Description |
---|---|---|
source | string |
version to be compared with |
target | string |
version to compare |
Check if versions are not equal (different)
Kind: static method of semVer
Returns: boolean
- Whether or not the versions are NOT identical
Param | Type | Description |
---|---|---|
source | string |
version to be compared with |
target | string |
version to compare |
Check if the target version is greater than the source
Kind: static method of semVer
Returns: boolean
- Whether or not the target version is greater than the source version
Param | Type | Description |
---|---|---|
source | string |
version to be compared with |
target | string |
version to compare |
Check if the target version is greater than or equal to the source
Kind: static method of semVer
Returns: boolean
- Whether or not the target version is greater than or equal to the source version
Param | Type | Description |
---|---|---|
source | string |
version to be compared with |
target | string |
version to compare |
Check if the target version is less than the source
Kind: static method of semVer
Returns: boolean
- Whether or not the target version is less than the source version
Param | Type | Description |
---|---|---|
source | string |
version to be compared with |
target | string |
version to compare |
Check if the target version is less than or equal to the source
Kind: static method of semVer
Returns: boolean
- Whether or not the target version is less than or equal to the source version
Param | Type | Description |
---|---|---|
source | string |
version to be compared with |
target | string |
version to compare |