Lua beautifier and minifier written in JavaScript, supporting Lua 5.1-5.4, FiveM hashed strings, and partial Luau. Current version is 1.6.1-b, with sporadic releases. Key differentiators: supports variable renaming, math solving, and custom indentation. Unlike other Lua formatters that require Lua runtime, this runs entirely in Node.js, making it suitable for build pipelines and online tools.
npm install lua-formatNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates both beautify and minify operations with common configuration options.
Set RenameGlobals to false or ensure all globals are statically referenced.
Disable SolveMath if mathematical transformations are undesired.
Create a .d.ts file with 'declare module "lua-format" { export function Beautify(code: string, options?: any): string; export function Minify(code: string, options?: any): string; }'npm install lua-format
Use named import: import { Beautify } from 'lua-format'No dependency data recorded yet.