name: duk_is_c_function proto: | duk_bool_t duk_is_c_function(duk_context *ctx, duk_idx_t index); stack: | [ ... val! ... ] summary: |

Returns 1 if value at index is a Function object and is assocated with a C function, otherwise returns 0. If index is invalid, also returns 0.

An example of an underlying C function observing the Duktape/C API calling convention:

  int my_func(duk_context *ctx) {
      /* ... */
  }
  
example: | if (duk_is_c_function(ctx, -3)) { /* ... */ } tags: - stack - function introduced: 1.0.0