Create a sloppy packLoader that might not even work

This will be useful for future version formats to parse them into a common format.
This commit is contained in:
Julia Logan 2024-07-02 01:10:45 +02:00
parent 378076ed9d
commit 5b7964303a
Signed by: julia
GPG key ID: 2CB69D1DB326E875

11
src/packLoader.js Normal file
View file

@ -0,0 +1,11 @@
import { readFile } from "node:fs/promises";
function packLoader(file) {
return new Promise((resolve, reject) => {
readFile(file, { encoding: "utf8" }).then(contents => {
resolve(JSON.parse(contents));
});
});
}
export default packLoader;