jSValueToNumber top-level property

double Function(Pointer<NativeType> ctx, Pointer<NativeType> value, Pointer<NativeType> exception) jSValueToNumber
final

Converts a JavaScript value to number and returns the resulting number. ctx (JSContextRef) The execution context to use. value (JSValueRef) The JSValue to convert. exception (JSValueRef*) A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. @result (double) The numeric result of conversion, or NaN if an exception is thrown.

Implementation

final double Function(Pointer ctx, Pointer value, Pointer exception)
    jSValueToNumber = JscFfi.lib
        .lookup<NativeFunction<Double Function(Pointer, Pointer, Pointer)>>(
            'JSValueToNumber')
        .asFunction();