hypercore-list 0.0.1-alpha.1 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +5 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -32,12 +32,15 @@ class HypercoreList {
32
32
  return this._getWithWaiting('TITLE', this.titleEncs)
33
33
  }
34
34
 
35
- async setEntries (orderedEntries) {
35
+ async setEntries (orderedEntries, { description } = {}) {
36
+ if (!description) description = `List entry for ${idEnc.normalize(this.bee.key)}`
37
+
38
+ if (!this.bee.opened) await this.bee.ready()
36
39
  const bufferEntries = []
37
40
  const rehosterEntries = new Map()
38
41
  for (const key of orderedEntries) {
39
42
  bufferEntries.push(idEnc.decode(key))
40
- rehosterEntries.set(key, {})
43
+ rehosterEntries.set(key, { description })
41
44
  }
42
45
 
43
46
  let inserted = true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore-list",
3
- "version": "0.0.1-alpha.1",
3
+ "version": "0.0.1",
4
4
  "description": "An ordered collection of hypercores",
5
5
  "main": "index.js",
6
6
  "scripts": {