aboutsummaryrefslogtreecommitdiff
path: root/parseClasses.js
diff options
context:
space:
mode:
authorJoel Kronqvist <work.joelkronqvist@pm.me>2022-03-10 10:40:10 +0200
committerJoel Kronqvist <work.joelkronqvist@pm.me>2022-03-10 10:40:10 +0200
commit01f3f5f2ab89432a253c24f76227b8f6855d8446 (patch)
tree94ae04efb6b93a328ba43f14847f2fd3f3d6d07c /parseClasses.js
parentfd329fac83ca83b768dbb39a17ea789cc8cdb65b (diff)
downloadLYLLRuoka-01f3f5f2ab89432a253c24f76227b8f6855d8446.tar.gz
LYLLRuoka-01f3f5f2ab89432a253c24f76227b8f6855d8446.zip
Class parsing with any number of files with classes
Diffstat (limited to 'parseClasses.js')
-rw-r--r--parseClasses.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/parseClasses.js b/parseClasses.js
index ffd8e7f..b114f33 100644
--- a/parseClasses.js
+++ b/parseClasses.js
@@ -56,13 +56,12 @@ function addToDBFromLists(DB, l1, l2, l1cond, l2cond)
}
}
-async function parseClasses(path1, path2, DB)
+async function parseClasses(DB, ...paths)
{
let parsed = [];
await DB.query_raw("DELETE FROM classes");
- parsed.push(parseClassData(path1, DB));
- if (path2 !== undefined)
- parsed.push(parseClassData(path2, DB));
+ for(const path of paths)
+ parsed.push(parseClassData(path, DB))
return await Promise.all(parsed);
}