Syntax
getupvalues(target: function | integer): tableAliases
debug.getupvaluesArguments
| Name | Type | Description |
|---|---|---|
target | function | integer | Function, stack level, or prototype to inspect. |
Returns
| Name | Type | Description |
|---|---|---|
upvalues | table | Array table of captured upvalues. |
Description
Returns all upvalues captured by a function.
Call it with 1 parameter(s): target. The argument table explains which values are required and which ones only refine the behavior.
It returns upvalues (table). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Example call with placeholder values.
local result = getupvalues(1)
print(result)