isexecutorclosure

Checks whether a function belongs to the executor.

Syntax

Signature
isexecutorclosure(Function: function) -> boolean

Aliases

  • checkclosure
  • isourclosure

Parameters

ParameterTypeDescription
FunctionfunctionFunction to inspect.

Returns

TypeDescription
booleanTrue when the function matches the executor's registration or environment checks.

Notes

Checks whether Function is a registered executor C callback or a Luau closure associated with the executor's environment or chunk names.

Example

Luau
local Result = isexecutorclosure(function() return 42 end)
print(Result)