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

Returns 1 if value at index is object coercible, as defined in CheckObjectCoercible, otherwise returns 0. If index is invalid, also returns 0.

All Ecmascript types are object coercible except undefined and null. The custom buffer and pointer types are object coercible.

example: | if (duk_is_object_coercible(ctx, -3)) { /* ... */ } tags: - stack - object introduced: 1.0.0