IsCustomFunction
Determine whether a given object is a custom function.
Method Signature
IsCustomFunction(object=[any], type=[string])
Arguments
Argument
Type
Required
Description
Default
object
any
true
The value to test for closure-ness.
type
string
false
Check for a specific type of custom function - UDF
, Lambda
, or Closure
.
Examples
isCustomFunction Example
Here we've example to check the given variable is user defined function or not.
function myfunc() {
return 1;
}
writeDump( isCustomFunction( myfunc ) );
Result: YES
isCustomFunction Example
Here we've example to check the given variable is user defined function or not.
myfunc = "2";
writeDump( isCustomFunction( myfunc ) );
Result: NO
Additional Examples
writeDump( isCustomFunction( realUDF ) );
writeDump( isCustomFunction( xxx ) );
testFun = realUDF;
X = 1;
writeDump( isCustomFunction( testFun ) );
writeDump( isCustomFunction( X ) );
function realUDF() {
return 1;
}
function xxx( Any void ) {
}
Related
Last updated
Was this helpful?