JSValueToNumber(_:_:_:)
Converts a JavaScript value to a number and returns the resulting number.
Declaration
func JSValueToNumber(_ ctx: JSContextRef!, _ value: JSValueRef!, _ exception: UnsafeMutablePointer<JSValueRef?>!) -> DoubleParameters
- ctx:
The execution context to use.
- value:
The Jsvalueref to convert.
- exception:
A pointer to a Jsvalueref to store an exception in, if any. Pass
NULLto discard any exception.
Return Value
The numeric result of conversion, or NaN if the system throws an exception.