islclosure Synchronous
isluaclosure
Tell whether a function is a Luau closure. Check this before reading or changing its constants or nested prototypes.
Luau
islclosure(value: Function) -> booleanParameters
| Parameter | Type | Description |
|---|---|---|
value | Function | The function to inspect. Passing a non-function raises an error. |
Returns
booleantrue for a Luau closure; false for a C closure.
Example
Luau
local scripted = function() return 42 end
print(islclosure(scripted)) -- true
print(islclosure(newcclosure(scripted))) -- false