go more uniform in the way the smartversion class is structured

This commit is contained in:
2017-08-18 12:39:43 +02:00
parent 54c9f34c33
commit 8bd800ae3f
3 changed files with 35 additions and 1 deletions

View File

@ -34,10 +34,24 @@ export class SmartVersion {
return this.semver.patch
}
greaterThan (smartVersionArg: SmartVersion) {
return this.greaterThanString(smartVersionArg.versionString)
}
/**
* compares the version of this against a string
*/
greaterThanString (versionStringArg) {
return plugins.semver.gt(this.versionString, versionStringArg)
}
lessThan (smartVersionArg: SmartVersion) {
return this.lessThanString(smartVersionArg.versionString)
}
/**
* compares the version of this against a string
*/
lessThanString (versionStringArg) {
return plugins.semver.lt(this.versionString, versionStringArg)
}