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_value
representing JavaScriptNumber
.[out] result
: C primitive equivalent of the givennapi_value
as 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
.