Aliases

  • getconstants

Arguments

function | number
required
The function to inspect, or a positive stack level identifying a caller.

Returns

{any}
A 1-based constant table. Nil, function, and table slots are represented as nil and may leave holes.
C closures are rejected. Nil/function/table entries may be absent in the returned table; ipairs can stop early. Related types: Debug types & behavior.

Example