name: duk_to_boolean proto: | duk_bool_t duk_to_boolean(duk_context *ctx, duk_idx_t index); stack: | [ ... val! ... ] -> [ ... ToBoolean(val)! ... ] summary: |
Replace the value at index
with an Ecmascript
ToBoolean()
coerced value. Returns 1 if the result of the coercion true
, 0 otherwise.
If index
is invalid, throws an error.