Nommiin icon

yypValidator

Nommiin | PRO | 09/08/19 10:49:22 PM UTC | 0 ⭐ | 286 👁️ | Never ⏰ | []
JavaScript |

650 B

|

None

|

0 👍

/

0 👎

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("\\"))})`);
            }
        }
    }
});

Comments