napi_get_value_double
functionv1js_native_api.hThis API returns the C double primitive equivalent of the given JavaScript number.
napi_status napi_get_value_double(napi_env env,
napi_value value,
double* result)
[in] env: The environment that the API is invoked under.[in] value:napi_valuerepresenting JavaScriptnumber.[out] result: C double primitive equivalent of the given JavaScriptnumber.
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 double primitive equivalent of the given JavaScript
number.