_LuaJIT Decompiler v2_ is a replacement tool for the old and now mostly defunct python decompiler. The project fixes all of the bugs and quirks the python decompiler had while also offering full support for gotos and stripped bytecode including loca
npm install node-luajit-decompiler-v2ts
import { type DecompileOptions, decompile } from "node-luajit-decompiler-v2";
const options: DecompileOptions = {
ignoreDebugInfo: false,
minimizeDiffs: true,
unrestrictedAscii: true,
};
try {
const tmpInFile = "file.luac";
const buffer = fs.readFileSync(tmpInFile);
const result = decompile(buffer, options);
fs.writeFileSync(tmpOutFile, result, "binary");
} catch (error) {
console.error(error);
}
``