isCustomFunction

Determines if a variable is a user defined function

isCustomFunction(value) → returns boolean

Argument Reference

value any
Required

The variable to test

Lucee does not accept value as a named argument; it uses name.

Examples
Sample code invoking the isCustomFunction function

Here we've example to check the given variable is user defined function or not.

function myfunc() {

return 1;

}

 writeDump( isCustomFunction(myfunc) );

Expected Result: YES

Here we've example to check the given variable is user defined function or not.

myfunc ="2";

 writeDump( isCustomFunction(myfunc) );

Expected Result: NO

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub