pub unsafe fn new_uint8_array_copy(
    ctx: *mut JSContext,
    buf: &[u8]
) -> Result<JSValueRef, JsError>
Expand description

create a new TypedArray with a buffer, the buffer is copied and that copy can be reclaimed later by calling detach_array_buffer_buffer_q

Safety

please ensure that the relevant QuickjsRealmAdapter is not dropped while using this function or a result of this function