struct OpaqueJSClass * JSClassRef
Definition JSBase.h:52
struct OpaqueJSString * JSStringRef
Definition JSBase.h:49
struct OpaqueJSValue * JSObjectRef
Definition JSBase.h:69
const struct OpaqueJSValue * JSValueRef
Definition JSBase.h:66
#define JS_EXPORT
Definition JSBase.h:93
const struct OpaqueJSContext * JSContextRef
Definition JSBase.h:43
JSValueRef JSValueMakeFromJSONString(JSContextRef ctx, JSStringRef string) JSC_API_AVAILABLE(macos(10.7)
Creates a JavaScript value from a JSON formatted string.
JSTypedArrayType JSValueGetTypedArrayType(JSContextRef ctx, JSValueRef value, JSValueRef *exception) JSC_API_AVAILABLE(macos(10.12)
Returns a JavaScript value's Typed Array type.
bool JSValueIsNumber(JSContextRef ctx, JSValueRef value)
Tests whether a JavaScript value's type is the number type.
JSValueRef JSValueMakeNull(JSContextRef ctx)
Creates a JavaScript value of the null type.
JSValueRef JSValueMakeSymbol(JSContextRef ctx, JSStringRef description) JSC_API_AVAILABLE(macos(10.15)
Creates a JavaScript value of the symbol type.
double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef *exception)
Converts a JavaScript value to number and returns the resulting number.
bool JSValueIsSymbol(JSContextRef ctx, JSValueRef value) JSC_API_AVAILABLE(macos(10.15)
Tests whether a JavaScript value's type is the symbol type.
bool JSValueIsNull(JSContextRef ctx, JSValueRef value)
Tests whether a JavaScript value's type is the null type.
JSStringRef JSValueCreateJSONString(JSContextRef ctx, JSValueRef value, unsigned indent, JSValueRef *exception) JSC_API_AVAILABLE(macos(10.7)
Creates a JavaScript string containing the JSON serialized representation of a JS value.
JSValueRef JSValueMakeUndefined(JSContextRef ctx)
Creates a JavaScript value of the undefined type.
void JSValueUnprotect(JSContextRef ctx, JSValueRef value)
Unprotects a JavaScript value from garbage collection.
bool JSValueIsObject(JSContextRef ctx, JSValueRef value)
Tests whether a JavaScript value's type is the object type.
bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef *exception)
Tests whether a JavaScript value is an object constructed by a given constructor, as compared by the ...
bool JSValueIsArray(JSContextRef ctx, JSValueRef value) JSC_API_AVAILABLE(macos(10.11)
Tests whether a JavaScript value is an array.
bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value)
Tests whether a JavaScript value's type is the undefined type.
JSValueRef JSValueMakeNumber(JSContextRef ctx, double number)
Creates a JavaScript value of the number type.
bool JSValueIsDate(JSContextRef ctx, JSValueRef value) JSC_API_AVAILABLE(macos(10.11)
Tests whether a JavaScript value is a date.
bool JSValueIsString(JSContextRef ctx, JSValueRef value)
Tests whether a JavaScript value's type is the string type.
bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsClass)
Tests whether a JavaScript value is an object with a given class in its class chain.
bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b)
Tests whether two JavaScript values are strict equal, as compared by the JS === operator.
JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef *exception)
Converts a JavaScript value to object and returns the resulting object.
JSType
A constant identifying the type of a JSValue.
Definition JSValueRef.h:47
@ kJSTypeNull
Definition JSValueRef.h:49
@ kJSTypeString
Definition JSValueRef.h:52
@ kJSTypeBoolean
Definition JSValueRef.h:50
@ kJSTypeObject
Definition JSValueRef.h:53
@ JSC_API_AVAILABLE
Definition JSValueRef.h:54
@ kJSTypeNumber
Definition JSValueRef.h:51
@ kJSTypeUndefined
Definition JSValueRef.h:48
JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef *exception)
Converts a JavaScript value to string and copies the result into a JavaScript string.
bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef *exception)
Tests whether two JavaScript values are equal, as compared by the JS == operator.
JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string)
Creates a JavaScript value of the string type.
bool JSValueToBoolean(JSContextRef ctx, JSValueRef value)
Converts a JavaScript value to boolean and returns the resulting boolean.
bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value)
Tests whether a JavaScript value's type is the boolean type.
JSTypedArrayType
A constant identifying the Typed Array type of a JSObjectRef.
Definition JSValueRef.h:75
@ kJSTypedArrayTypeUint16Array
Definition JSValueRef.h:81
@ kJSTypedArrayTypeInt32Array
Definition JSValueRef.h:78
@ kJSTypedArrayTypeInt16Array
Definition JSValueRef.h:77
@ kJSTypedArrayTypeNone
Definition JSValueRef.h:86
@ kJSTypedArrayTypeInt8Array
Definition JSValueRef.h:76
@ kJSTypedArrayTypeArrayBuffer
Definition JSValueRef.h:85
@ kJSTypedArrayTypeUint32Array
Definition JSValueRef.h:82
@ kJSTypedArrayTypeBigUint64Array
Definition JSValueRef.h:88
@ kJSTypedArrayTypeUint8ClampedArray
Definition JSValueRef.h:80
@ kJSTypedArrayTypeBigInt64Array
Definition JSValueRef.h:87
@ kJSTypedArrayTypeFloat32Array
Definition JSValueRef.h:83
@ kJSTypedArrayTypeUint8Array
Definition JSValueRef.h:79
@ kJSTypedArrayTypeFloat64Array
Definition JSValueRef.h:84
void JSValueProtect(JSContextRef ctx, JSValueRef value)
Protects a JavaScript value from garbage collection.
JSType JSValueGetType(JSContextRef ctx, JSValueRef value)
Returns a JavaScript value's type.
JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool boolean)
Creates a JavaScript value of the boolean type.