napi_get_value_uint32
functionv1js_native_api.hThis API returns the C primitive equivalent of the given napi_value as a uint32_t.
napi_status napi_get_value_uint32(napi_env env,
napi_value value,
uint32_t* result)
[in] env: The environment that the API is invoked under.[in] value:napi_valuerepresenting JavaScriptnumber.[out] result: C primitive equivalent of the givennapi_valueas auint32_t.
Returns napi_ok if the API succeeded. If a non-number napi_value
is passed in it returns napi_number_expected.
This API returns the C primitive equivalent of the given napi_value as a
uint32_t.