10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-03 18:06:06 +02:00
QUESTDB_website/static/js/indexDB.js

10 lines
382 B
JavaScript
Raw Normal View History

2020-09-20 17:53:58 +02:00
class indexDB {
static async loadAsync() {
var db = new indexDB
const text = await getTextFromFileUrlAsync("/data/index.yaml")
const myYaml = jsyaml.load(text);
db.sets = ((myYaml.sets === null) ? new Map() : new Map(Object.entries(myYaml.sets)));
db.others = ((myYaml.others === null) ? new Map() : new Map(Object.entries(myYaml.others)));
return db
}
}