hyperbee2 2.0.4 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -45,6 +45,10 @@ class Hyperbee {
45
45
  this.ready().catch(noop)
46
46
  }
47
47
 
48
+ static isHyperbee(bee) {
49
+ return bee instanceof Hyperbee
50
+ }
51
+
48
52
  head() {
49
53
  if (!this.root) return null
50
54
  if (this.root === EMPTY) return { length: 0, key: this.context.core.key }
package/lib/write.js CHANGED
@@ -324,7 +324,7 @@ module.exports = class WriteBatch {
324
324
  }
325
325
 
326
326
  _shouldInlineValue(k) {
327
- if (!k.value || supportsCompression(this.type)) return true
327
+ if (!k.value || !supportsCompression(this.type)) return true
328
328
  if (k.valuePointer) return true
329
329
  return k.value.byteLength <= this.inlineValueSize
330
330
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperbee2",
3
- "version": "2.0.4",
3
+ "version": "2.1.1",
4
4
  "description": "btree",
5
5
  "main": "index.js",
6
6
  "files": [