aboutsummaryrefslogtreecommitdiff
path: root/src/libtoolVersion.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-10-15 19:28:35 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-10-15 20:30:33 +0200
commit8b2f53e3ed810a0539f76feb993f0044bc8c0f38 (patch)
treef88687b498f133e8e7c0743def7ef7929f6173c6 /src/libtoolVersion.ts
parent353eeca339e060eb4a03e0b67343086854a5e5d7 (diff)
downloadwallet-core-8b2f53e3ed810a0539f76feb993f0044bc8c0f38.tar.xz
fix tslint warnings
Diffstat (limited to 'src/libtoolVersion.ts')
-rw-r--r--src/libtoolVersion.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libtoolVersion.ts b/src/libtoolVersion.ts
index 8800fde03..cc2435b94 100644
--- a/src/libtoolVersion.ts
+++ b/src/libtoolVersion.ts
@@ -16,7 +16,7 @@
/**
* Semantic versioning, but libtool-style.
- * See https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
+ * See https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
*/
@@ -32,7 +32,7 @@ export interface VersionMatchResult {
* Is the first version older (-1), newser (+1) or
* identical (0)?
*/
- currentCmp: number
+ currentCmp: number;
}
interface Version {
@@ -41,6 +41,9 @@ interface Version {
age: number;
}
+/**
+ * Compare two libtool-style version strings.
+ */
export function compare(me: string, other: string): VersionMatchResult|undefined {
const meVer = parseVersion(me);
const otherVer = parseVersion(other);
@@ -60,7 +63,7 @@ export function compare(me: string, other: string): VersionMatchResult|undefined
function parseVersion(v: string): Version|undefined {
const [currentStr, revisionStr, ageStr, ...rest] = v.split(":");
- if (rest.length != 0) {
+ if (rest.length !== 0) {
return undefined;
}
const current = Number.parseInt(currentStr);