JSValueRef.h

A JavaScript value that is the base type for all JavaScript values and the polymorphic functions on them.

Topics

Functions

JSValueCreateJSONString

Creates a JavaScript string containing the JSON serialized representation of a JavaScript value.

JSValueGetType

Returns a JavaScript value’s type.

JSValueIsBoolean

Tests whether a JavaScript value is Boolean.

JSValueIsEqual

Tests whether two JavaScript values are equal, as compared by the JS == operator.

JSValueIsInstanceOfConstructor

Tests whether a JavaScript value is an object constructed by a given constructor, as compared by the isInstanceOf: operator.

JSValueIsNull

Tests whether a JavaScript value’s type is the null type.

JSValueIsNumber

Tests whether a JavaScript value’s type is the number type.

JSValueIsObject

Tests whether a JavaScript value’s type is the object type.

JSValueIsObjectOfClass

Tests whether a JavaScript value is an object with a given class in its class chain.

JSValueIsStrictEqual

Tests whether two JavaScript values are strict equal, as compared by the JS === operator.

JSValueIsString

Tests whether a JavaScript value’s type is the string type.

JSValueIsUndefined

Tests whether a JavaScript value’s type is the undefined type.

JSValueMakeBoolean

Creates a JavaScript Boolean value.

JSValueMakeFromJSONString

Creates a JavaScript value from a JSON formatted string.

JSValueMakeNull

Creates a JavaScript value of the null type.

JSValueMakeNumber

Creates a JavaScript value of the number type.

JSValueMakeString

Creates a JavaScript value of the string type.

JSValueMakeUndefined

Creates a JavaScript value of the undefined type.

JSValueProtect

Protects a JavaScript value from garbage collection.

JSValueToBoolean

Converts a JavaScript value to a Boolean and returns the resulting Boolean.

JSValueToNumber

Converts a JavaScript value to number and returns the resulting number.

JSValueToObject

Converts a JavaScript value to object and returns the resulting object.

JSValueToStringCopy

Converts a JavaScript value to string and copies the result into a JavaScript string.

JSValueUnprotect

Unprotects a JavaScript value from garbage collection.

Data Types

JSType

A constant identifying the type of a JSValue.

See Also

Legacy JavaScriptCore APIs

JSBase.h

Defines the JavaScriptCore interface engine.

JSObjectRef.h

A JavaScript Object.

JSStringRef.h

A UTF16 character buffer that is the fundamental string representation in JavaScript.

JSStringRefCF.h

Contains CFString convenience methods.