Returns true when fn is a wrapper produced by newcclosure. Also registered as iscustomcclosure.

Parameters

function
required
The function to test.

Returns

boolean
true only for Athena newcclosure wrappers; false for ordinary C closures, Luau closures, and engine functions.

Behavior

This is narrower than iscclosure: every newcclosure wrapper is a C closure, but not every C closure is a wrapper. Use this when you specifically need to know whether a function forwards through Athena’s wrapper machinery, for example before calling getwrappedoriginal.

Example

Errors