Comparing version 1.1.0 to 1.1.1
12
index.js
@@ -94,3 +94,3 @@ const codecs = require('codecs') | ||
const mid = (s + e) >> 1 | ||
c = cmp(key.value, await this.getKey(mid)) | ||
c = Buffer.compare(key.value, await this.getKey(mid)) | ||
@@ -533,3 +533,3 @@ if (c === 0) { | ||
c = cmp(key, await node.getKey(mid)) | ||
c = Buffer.compare(key, await node.getKey(mid)) | ||
@@ -576,3 +576,3 @@ if (c === 0) { | ||
const mid = (s + e) >> 1 | ||
c = cmp(target.value, await node.getKey(mid)) | ||
c = Buffer.compare(target.value, await node.getKey(mid)) | ||
@@ -636,3 +636,3 @@ if (c === 0) { | ||
const mid = (s + e) >> 1 | ||
c = cmp(key, await node.getKey(mid)) | ||
c = Buffer.compare(key, await node.getKey(mid)) | ||
@@ -836,6 +836,2 @@ if (c === 0) { | ||
function cmp (a, b) { | ||
return a < b ? -1 : b < a ? 1 : 0 | ||
} | ||
function encRange (e, opts) { | ||
@@ -842,0 +838,0 @@ if (!e) return opts |
@@ -207,3 +207,3 @@ class SubTree { | ||
if (!b) return a ? -1 : 0 | ||
return a < b ? -1 : b < a ? 1 : 0 | ||
return Buffer.compare(a, b) | ||
} |
@@ -86,3 +86,3 @@ module.exports = class RangeIterator { | ||
const mid = (s + e) >> 1 | ||
c = cmp(start, await node.getKey(mid)) | ||
c = Buffer.compare(start, await node.getKey(mid)) | ||
@@ -147,3 +147,3 @@ if (c === 0) { | ||
if (end) { | ||
const c = cmp(block.key, end) | ||
const c = Buffer.compare(block.key, end) | ||
if (c === 0 ? !incl : (this._reverse ? c < 0 : c > 0)) { | ||
@@ -163,5 +163,1 @@ this._limit = 0 | ||
} | ||
function cmp (a, b) { | ||
return a < b ? -1 : b < a ? 1 : 0 | ||
} |
{ | ||
"name": "hyperbee", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "An append-only Btree running on a Hypercore.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
93230
2768