Skip to content
napi-bindings

Search

Search pages, projects and the Node-API reference

Browse Node-APIshow

napi_get_value_uint32

functionv1js_native_api.h

This 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_value representing JavaScript number.
  • [out] result: C primitive equivalent of the given napi_value as a uint32_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.

View in the official Node.js documentation