@leofcoin/peernet 0.14.6 → 0.14.7
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/dist/browser/peernet.js +11 -0
- package/package.json +1 -1
package/dist/browser/peernet.js
CHANGED
|
@@ -3222,6 +3222,7 @@ class LeofcoinStorage {
|
|
|
3222
3222
|
if (typeof key === 'object') return this.many('get', key);
|
|
3223
3223
|
return this.db.get(new KeyPath(key))
|
|
3224
3224
|
}
|
|
3225
|
+
|
|
3225
3226
|
/**
|
|
3226
3227
|
*
|
|
3227
3228
|
* @param {*} key
|
|
@@ -3268,6 +3269,16 @@ class LeofcoinStorage {
|
|
|
3268
3269
|
return Promise.all(promises)
|
|
3269
3270
|
}
|
|
3270
3271
|
|
|
3272
|
+
async values() {
|
|
3273
|
+
const keys = await this.keys();
|
|
3274
|
+
|
|
3275
|
+
let promises = [];
|
|
3276
|
+
for (const key of keys) {
|
|
3277
|
+
promises.push(this.db.get(key));
|
|
3278
|
+
}
|
|
3279
|
+
return Promise.all(promises)
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3271
3282
|
async many(type, _value) {
|
|
3272
3283
|
const jobs = [];
|
|
3273
3284
|
|