const fs = require("fs"); JSON.parse(fs.readFileSync(fs.readdirSync("./").filter(fn => fn.endsWith(".yyp"))[0]).toString()).resources.forEach(e => { let Path = e.Value.resourcePath.slice(0, e.Value.resourcePath.indexOf("\\")), Type = e.Value.resourceType.replace("GM", "").toLowerCase(); switch (Type) { case "folder": case "includedfile": break; default: { if (Type.endsWith("options") == true) break; if (Path.indexOf(Type) == -1) { console.log(`WARNING: Mismatched Type @ ${e.Key} (Found: ${Type}, Expected: ${Path.slice(0, Path.indexOf("\\"))})`); } } } });