corestore 7.0.23 → 7.1.0

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.
Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/index.js +4 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -76,6 +76,9 @@ const core1 = ns1.get({ name: 'main' }) // These will load different Hypercores
76
76
  const core2 = ns2.get({ name: 'main' })
77
77
  ```
78
78
 
79
+ #### `const stream = store.list(namespace)`
80
+ Creates a discovery key stream of all cores within a namespace or all cores in general if no namespace is provided.
81
+
79
82
  #### `await store.close()`
80
83
  Fully close this Corestore instance.
81
84
 
package/index.js CHANGED
@@ -306,6 +306,10 @@ class Corestore extends ReadyResource {
306
306
  return this.session({ ...opts, namespace: generateNamespace(this.ns, name) })
307
307
  }
308
308
 
309
+ list (namespace) {
310
+ return this.storage.createDiscoveryKeyStream(namespace)
311
+ }
312
+
309
313
  getAuth (discoveryKey) {
310
314
  return this.storage.getAuth(discoveryKey)
311
315
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "corestore",
3
- "version": "7.0.23",
3
+ "version": "7.1.0",
4
4
  "description": "A Hypercore factory that simplifies managing collections of cores.",
5
5
  "main": "index.js",
6
6
  "files": [