name: duk_to_uint16 proto: | duk_uint16_t duk_to_uint16(duk_context *ctx, duk_idx_t idx); stack: | [ ... val! ... ] -> [ ... ToUint16(val)! ... ] summary: |

Replace the value at idx with an Ecmascript ToUint16() coerced value. Returns the coerced value. If idx is invalid, throws an error.

example: | printf("ToUint16(): %u\n", (unsigned int) duk_to_uint16(ctx, -3)); tags: - stack introduced: 1.0.0