This function provides basic analysis of module code, pointing out any unused variables or unexpected globals. Note that just because this module points out certain behaviour does not neccessarily mean the behaviour is wrong nor needs correcting, but is rather a guide.
The code of this is mostly lifted from https://github.com/9382/Dump/tree/main/LuaObfuscator, which in turn lifts a lot of code from https://github.com/stravant/LuaMinify.
This module can be required and used from the Debug console, like the following:
This module can also be used via templates using #invoke:
, like the following: