isnewcclosure Synchronous
iscustomcclosure
Identify a wrapper created by newcclosure. It is narrower than iscclosure: an ordinary native C function is not necessarily one of these wrappers.
Luau
isnewcclosure(value: Function) -> booleanParameters
| Parameter | Type | Description |
|---|---|---|
value | Function | The function to inspect. Passing a non-function raises an error. |
Returns
booleantrue for a newcclosure wrapper; false for other functions.
Example
Luau
local wrapped = newcclosure(function(value) return value end)
print(isnewcclosure(wrapped)) -- true
print(iscclosure(wrapped)) -- true