debug.getprotos
Returns every function nested inside another.
Signature
debug.getprotos(fn: function | number): { function }Parameters
fnfunction | numberThe parent function.
Returns
{ function }
Example
local function outer()
local function a() end
local function b() end
end
print(#debug.getprotos(outer)) --> 2