Comparing version 2.13.5 to 2.14.0
28
index.js
@@ -322,6 +322,30 @@ const codecs = require('codecs') | ||
update () { | ||
return this.core.update({ ifAvailable: true, hash: false }) | ||
get id () { | ||
return this.core.id | ||
} | ||
get key () { | ||
return this.core.key | ||
} | ||
get discoveryKey () { | ||
return this.core.discoveryKey | ||
} | ||
get writable () { | ||
return this.core.writable | ||
} | ||
get readable () { | ||
return this.core.readable | ||
} | ||
replicate (isInitiator, opts) { | ||
return this.core.replicate(isInitiator, opts) | ||
} | ||
update (opts) { | ||
return this.core.update(opts) | ||
} | ||
peek (range, opts) { | ||
@@ -328,0 +352,0 @@ return iteratorPeek(this.createRangeIterator(range, { ...opts, limit: 1 })) |
{ | ||
"name": "hyperbee", | ||
"version": "2.13.5", | ||
"version": "2.14.0", | ||
"description": "An append-only B-tree running on a Hypercore.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -88,2 +88,24 @@ # Hyperbee 🐝 | ||
#### `db.id` | ||
String containing the id (z-base-32 of the public key) identifying this bee. | ||
#### `db.key` | ||
Buffer containing the public key identifying this bee. | ||
#### `db.discoveryKey` | ||
Buffer containing a key derived from `db.key`. | ||
This discovery key does not allow you to verify the data, it's only to announce or look for peers that are sharing the same bee, without leaking the bee key. | ||
#### `db.writable` | ||
Boolean indicating if we can put or delete data in this bee. | ||
#### `db.readable` | ||
Boolean indicating if we can read from this bee. After closing the bee this will be `false`. | ||
#### `await db.put(key, [value], [options])` | ||
@@ -166,2 +188,6 @@ | ||
#### `const stream = db.replicate(isInitiatorOrStream)` | ||
See more about how replicate works at [core.replicate][core-replicate-docs]. | ||
#### `const batch = db.batch()` | ||
@@ -362,1 +388,3 @@ | ||
`options` are the same as the `core.get` method. | ||
[core-replicate-docs]: https://github.com/holepunchto/hypercore#const-stream--corereplicateisinitiatororreplicationstream |
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
91465
2515
388