hyperdrive
Advanced tools
Comparing version 11.0.0-alpha.17 to 11.0.0-alpha.18
36
index.js
@@ -196,4 +196,2 @@ const Hyperbee = require('hyperbee') | ||
const diffing = !!(opts && opts.diff) | ||
let node = null | ||
@@ -207,17 +205,7 @@ | ||
const infoBefore = diffing === true | ||
? await this.blobs.core.info({ storage: true }) | ||
: null | ||
if (node !== null && this.blobs !== null) { | ||
await this.blobs.clear(node.value.blob) | ||
if (node === null || this.blobs === null) { | ||
return (opts && opts.diff) ? { blocks: 0 } : null | ||
} | ||
if (diffing === false) return null | ||
const infoAfter = await this.blobs.core.info({ storage: true }) | ||
return { | ||
blocks: infoBefore.storage.blocks - infoAfter.storage.blocks | ||
} | ||
return this.blobs.clear(node.value.blob, opts) | ||
} | ||
@@ -228,19 +216,7 @@ | ||
const diffing = !!(opts && opts.diff) | ||
const infoBefore = diffing === true | ||
? await this.blobs.core.info({ storage: true }) | ||
: null | ||
if (this.blobs !== null) { | ||
await this.blobs.core.clear(0, this.blobs.core.length) | ||
if (this.blobs === null) { | ||
return (opts && opts.diff) ? { blocks: 0 } : null | ||
} | ||
if (diffing === false) return null | ||
const infoAfter = await this.blobs.core.info({ storage: true }) | ||
return { | ||
blocks: infoBefore.storage.blocks - infoAfter.storage.blocks | ||
} | ||
return this.blobs.core.clear(0, this.blobs.core.length, opts) | ||
} | ||
@@ -247,0 +223,0 @@ |
{ | ||
"name": "hyperdrive", | ||
"version": "11.0.0-alpha.17", | ||
"version": "11.0.0-alpha.18", | ||
"description": "Hyperdrive is a secure, real-time distributed file system", | ||
@@ -25,3 +25,3 @@ "main": "index.js", | ||
"hyperbee": "^2.1.1", | ||
"hyperblobs": "^2.1.0", | ||
"hyperblobs": "^2.3.0", | ||
"is-options": "^1.0.2", | ||
@@ -28,0 +28,0 @@ "mirror-drive": "^1.2.0", |
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
33821
402
Updatedhyperblobs@^2.3.0