@actually_connor/uuid
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -9,2 +9,4 @@ "use strict"; | ||
const uuid_1 = require("uuid"); | ||
const util_1 = require("./util"); | ||
/** | ||
@@ -128,5 +130,35 @@ * Uuid provides constants and static methods for working with and generating UUIDs | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
equals(other) { | ||
if (!(other instanceof Uuid)) { | ||
return false; | ||
} | ||
return this.compareTo(other) === 0; | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
compareTo(other) { | ||
const compare = (0, util_1.strcmp)(this.toString(), other.toString()); | ||
if (compare < 0) { | ||
return -1; | ||
} | ||
if (compare > 0) { | ||
return 1; | ||
} | ||
return 0; | ||
} | ||
} | ||
exports.Uuid = Uuid; |
@@ -9,2 +9,4 @@ "use strict"; | ||
const uuid_1 = require("uuid"); | ||
const util_1 = require("./util"); | ||
/** | ||
@@ -128,5 +130,35 @@ * Uuid provides constants and static methods for working with and generating UUIDs | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
equals(other) { | ||
if (!(other instanceof Uuid)) { | ||
return false; | ||
} | ||
return this.compareTo(other) === 0; | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
compareTo(other) { | ||
const compare = (0, util_1.strcmp)(this.toString(), other.toString()); | ||
if (compare < 0) { | ||
return -1; | ||
} | ||
if (compare > 0) { | ||
return 1; | ||
} | ||
return 0; | ||
} | ||
} | ||
exports.Uuid = Uuid; |
@@ -9,2 +9,4 @@ "use strict"; | ||
const uuid_1 = require("uuid"); | ||
const util_1 = require("./util"); | ||
/** | ||
@@ -128,5 +130,35 @@ * Uuid provides constants and static methods for working with and generating UUIDs | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
equals(other) { | ||
if (!(other instanceof Uuid)) { | ||
return false; | ||
} | ||
return this.compareTo(other) === 0; | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
compareTo(other) { | ||
const compare = (0, util_1.strcmp)(this.toString(), other.toString()); | ||
if (compare < 0) { | ||
return -1; | ||
} | ||
if (compare > 0) { | ||
return 1; | ||
} | ||
return 0; | ||
} | ||
} | ||
exports.Uuid = Uuid; |
{ | ||
"name": "@actually_connor/uuid", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "A JavaScript library that provides a 'ramsey/uuid'-like interface for the uuid package", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18378
15
441