Get the number of arguments a function expects.
uint16_t JS_GetFunctionArity(JSFunction *fun);
JS_GetFunctionArity returns the number of formal parameters of a function,
fun. This is the same as the function object's
arity property, if that property has not been overwritten. Specifically, if
fun is a native function, the result is the value that was passed to the
nargs parameter of