An ECMAScript value.
<mrdocs/Support/JavaScript.hpp>
class Value;
| Name | Description |
|---|---|
Value [constructor] | Constructor |
~Value [destructor] | Destructor |
operator= | Assignment operators |
apply | Invoke a function with variadic arguments. |
call | Invoke a function. |
callProp | Invoke a method. |
empty | Return if an Array or Object is empty. |
exists | Return true if a key exists. |
get | get overloads |
getArray | Return the underlying array. |
getBool | Return the underlying boolean value. |
getDom | Return the value as a dom::Value |
getDouble | Return the underlying double value. |
getFunction | Return the underlying array. |
getInteger | Return the underlying integer value. |
getObject | Return the underlying object. |
getString | Return the underlying string |
isArray | Check if the value is an array. |
isBoolean | Check if the value is a boolean. |
isDouble | Check if the value is a floating point number. |
isFunction | Check if the value is a function. |
isInteger | Check if the value is an integer number. |
isNull | Check if the value is null. |
isNumber | Check if the value is a number. |
isObject | Check if the value is an object. |
isString | Check if the value is a string. |
isTruthy | Determine if a value is truthy |
isUndefined | Check if the value is undefined. |
lookup | Lookup a sequence of keys. |
operator() | Invoke a function. |
set | Set or replace the value for a given key. |
setlog | Set "log" property |
size | Return if an Array or Object is empty. |
swap | Swap two values. |
type | Return the type of the value. |
operator std::string | Return the string. |
operator bool | Determine if a value is truthy |
| Name | Description |
|---|---|
Value [constructor] | Constructor |
| Name |
|---|
idx_ |
scope_ |
| Name | Description |
|---|---|
toString |
Return value as a string. |
operator&& |
|
operator&& |
|
operator&& |
Return the first Value that is not truthy, or the last one. |
operator|| |
|
operator|| |
|
operator|| |
Return the first Value that is truthy, or the last one. |
operator<=> |
Compare two values for inequality. |
operator!= |
|
operator!= |
|
operator!= |
Inequality operator |
operator== |
|
operator== |
|
operator== |
Compare two values for equality. |
swap |
Swap two values. |
Access |
This class represents a value in the JavaScript interpreter.
A value is a variable that is defined in a Scope. It can be a primitive type or an object.
A Value not associated with a Scope is undefined.
The user is responsible for ensuring that the lifetime of a Value does not exceed the lifetime of the Scope that created it.
A value can be converted to a DOM value using the getDom function.
Scope
Type