pub unsafe extern "C" fn JSValueToNumber(
ctx: JSContextRef,
value: JSValueRef,
exception: *mut JSValueRef,
) -> f64
Expand description
Converts a JavaScript value to number and returns the resulting number.
ctx
: The execution context to use.value
: TheJSValueRef
to convert.exception
: A pointer to aJSValueRef
in which to store an exception, if any. PassNULL
if you do not care to store an exception.
Returns the numeric result of conversion, or NaN
if an exception is thrown.