iscclosure Synchronous

Tell whether a function is a native C closure. This is useful before using debug operations that only work on Luau closures.

Syntax
Luau
iscclosure(value: Function) -> boolean

Parameters

Function parameters
ParameterTypeDescription
valueFunctionThe function to inspect. Passing a non-function raises an error.

Returns

boolean

true for a C closure; false for a Luau closure.

Example

Example
Luau
local native = newcclosure(function() end)
print(iscclosure(native)) -- true
print(iscclosure(function() end)) -- false
Kawaii documentation