braid-text 0.0.6 → 0.0.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/index.js +8 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -490,12 +490,14 @@ braid_text.put = async (key, options) => {
|
|
|
490
490
|
}
|
|
491
491
|
|
|
492
492
|
braid_text.list = async () => {
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
let
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
493
|
+
try {
|
|
494
|
+
var pages = new Set()
|
|
495
|
+
for (let x of await require('fs').promises.readdir(braid_text.db_folder)) {
|
|
496
|
+
let m = x.match(/^(.*)\.\d+$/)
|
|
497
|
+
if (m) pages.add(decode_filename(m[1]))
|
|
498
|
+
}
|
|
499
|
+
return [...pages.keys()]
|
|
500
|
+
} catch (e) { return [] }
|
|
499
501
|
}
|
|
500
502
|
|
|
501
503
|
async function get_resource(key) {
|