=proto int duk_require_boolean(duk_context *ctx, int index); =stack [ ... val! ... ] =summary
Like duk_get_boolean(), but throws an error if the value at index is not a boolean or if the index is invalid.
=example if (duk_require_boolean(ctx, -3)) { printf("value is true\n"); }