debug.getconstants
Lists a Lua function's constants by their original indices.
Nil constants are omitted, so the returned table can have holes. Use pairs rather than relying on its length.
debug.getconstants(subject: function | number): {any}Parameters
| Parameter | Type | Description |
|---|---|---|
subject | function | number | Lua function or reachable stack level. C functions are rejected by prototype readers. |
Errors: Invalid stack levels or C-function subjects raise errors.
Aliases: getconstants.
