MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / compare

Method compare

lib/token.js:271–274  ·  view source on GitHub ↗

* Returns 0 if the values are equal, otherwise compares against * start, if start is equal, compares against end. * * @param {TokenRange} other Range to compare with. * @returns {Number}

(other)

Source from the content-addressed store, hash-verified

269 * @returns {Number}
270 */
271 compare(other) {
272 const compareStart = this.start.compare(other.start);
273 return compareStart !== 0 ? compareStart : this.end.compare(other.end);
274 }
275
276 toString() {
277 return util.format(']%s, %s]',

Callers 1

equalsMethod · 0.95

Calls 1

compareMethod · 0.65

Tested by

no test coverage detected