Home Reference Source
import Value from 'esper.js/src/Value.js'
public class | source

Value

Direct Subclass:

BridgeValue, EmptyValue, FutureValue, LinkValue, ObjectValue, PrimitiveValue, src/stdlib/Proxy.js~ProxyValue

Represents a value a variable could take.

Static Member Summary

Static Public Members
public static get

Holds a value representing ''

public static get

false: BooleanValue: *

Holds a value representing fasle

public static get

Holds a value representing NaN

public static get

Holds a value representing null

public static get

true: BooleanValue: *

Holds a value representing true

public static get

Holds a value representing undefined

public static get

Holds a value representing 0

Static Method Summary

Static Public Methods
public static

createNativeBookmark(v: *, realm: *): *

public static

fromNative(value: any, realm: Realm): *

Convert a native javascript value to a Value

public static

fromPrimativeNative(value: any): *

Convert a native javascript primative value to a Value

public static

getBookmark(native: *): *

public static

hasBookmark(native: *): *

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get abstract

A string representation of this Value suitable for display when debugging.

public get
public get
public

serial: *

public get
public get abstract

Is the value is truthy, i.e.

Method Summary

Public Methods
public

* bitAnd(other: *): *

public

* bitNot(): *

public

* bitOr(other: *): *

public

* bitXor(other: *): *

public

* divide(other: Value): Value

Computes the javascript expression value / other

public

* doubleNotEquals(other: Value, realm: Realm): Value

Computes the javascript expression !(value === other)

public

* fastGen(): *

Quickly make a generator for this value

public

fromNative(other: *, realm: *): *

public abstract

* get(name: String, realm: Realm): Value

Indexes the value to get the value of a property.

public

getImmediate(name: *): *

public
public

* gt(other: Value): Value

Computes the javascript expression value > other

public

* gte(other: Value): Value

Computes the javascript expression value >= other

public

* inOperator(other: *): *

public

inspect(): *

public

* lt(other: Value): Value

Computes the javascript expression value < other

public

* lte(other: Value): Value

Computes the javascript expression value <= other

public

* makeThisForNew(realm: *): *

public

* mod(other: Value): Value

Computes the javascript expression value % other

public

* multiply(other: Value): Value

Computes the javascript expression value * other

public

* not(): Value

Computes the javascript expression !value

public

* notEquals(other: Value, realm: Realm): Value

Computes the javascript expression !(value == other)

public

* pow(other: Value): Value

Computes the value raised to the other power (value ** other)

public

* shiftLeft(other: *): *

public

* shiftRight(other: *): *

public

* shiftRightZF(other: *): *

public

* subtract(other: Value): Value

Computes the javascript expression value - other

public
public

* toIntNative(): *

public

toJS(): *

Deep copy this value to a native javascript value.

public abstract

toNative(): *

Converts this value to a native javascript value.

public
public
public

* toPrimitiveNative(preferedType: *): *

public

* toPrimitiveValue(preferedType: *)

public
public
public

* toUIntNative(): *

public

* tripleEquals(other: Value, realm: Realm): Value

Computes the javascript expression value === other

public

* typeOf(): Value

Computes the javascript expression typeof value

public

Computes the javascript expression -value

public

Computes the javascript expression +value

Static Public Members

public static get emptyString: StringValue: * source

Holds a value representing ''

Return:

StringValue

''

public static get false: BooleanValue: * source

Holds a value representing fasle

Return:

BooleanValue

false

public static get nan: NumberValue: * source

Holds a value representing NaN

Return:

NumberValue

NaN

public static get null: NullValue: * source

Holds a value representing null

Return:

NullValue

public static get true: BooleanValue: * source

Holds a value representing true

Return:

BooleanValue

true

public static get undef: UndefinedValue: * source

Holds a value representing undefined

Return:

UndefinedValue

public static get zero: NumberValue: * source

Holds a value representing 0

Return:

NumberValue

0

Static Public Methods

public static createNativeBookmark(v: *, realm: *): * source

Params:

NameTypeAttributeDescription
v *
realm *

Return:

*

public static fromNative(value: any, realm: Realm): * source

Convert a native javascript value to a Value

Params:

NameTypeAttributeDescription
value any

The value to convert

realm Realm

The realm of the new value.

Return:

*

public static fromPrimativeNative(value: any): * source

Convert a native javascript primative value to a Value

Params:

NameTypeAttributeDescription
value any

The value to convert

Return:

*

public static getBookmark(native: *): * source

Params:

NameTypeAttributeDescription
native *

Return:

*

public static hasBookmark(native: *): * source

Params:

NameTypeAttributeDescription
native *

Return:

*

Public Constructors

public constructor() source

Public Members

public get abstract debugString: string: * source

A string representation of this Value suitable for display when debugging.

Return:

string

public get isCallable: * source

public get jsTypeName source

public serial: * source

public get specTypeName: * source

public get abstract truthy: boolean source

Is the value is truthy, i.e. !!value

Public Methods

public * bitAnd(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public * bitNot(): * source

Return:

*

public * bitOr(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public * bitXor(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public * divide(other: Value): Value source

Computes the javascript expression value / other

Params:

NameTypeAttributeDescription
other Value

The other value

Return:

Value

public * doubleNotEquals(other: Value, realm: Realm): Value source

Computes the javascript expression !(value === other)

Params:

NameTypeAttributeDescription
other Value

The other value

realm Realm

The realm to use when creating resuls.

Return:

Value

public * fastGen(): * source

Quickly make a generator for this value

Return:

*

public fromNative(other: *, realm: *): * source

Params:

NameTypeAttributeDescription
other *
realm *

Return:

*

public abstract * get(name: String, realm: Realm): Value source

Indexes the value to get the value of a property. i.e. value[name]

Params:

NameTypeAttributeDescription
name String
realm Realm

Return:

Value

public getImmediate(name: *): * source

Params:

NameTypeAttributeDescription
name *

Return:

*

public getPrototypeProperty(): * source

Return:

*

public * gt(other: Value): Value source

Computes the javascript expression value > other

Params:

NameTypeAttributeDescription
other Value

The other value

Return:

Value

public * gte(other: Value): Value source

Computes the javascript expression value >= other

Params:

NameTypeAttributeDescription
other Value

The other value

Return:

Value

public * inOperator(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public inspect(): * source

Return:

*

public * lt(other: Value): Value source

Computes the javascript expression value < other

Params:

NameTypeAttributeDescription
other Value

The other value

Return:

Value

public * lte(other: Value): Value source

Computes the javascript expression value <= other

Params:

NameTypeAttributeDescription
other Value

The other value

Return:

Value

public * makeThisForNew(realm: *): * source

Params:

NameTypeAttributeDescription
realm *

Return:

*

public * mod(other: Value): Value source

Computes the javascript expression value % other

Params:

NameTypeAttributeDescription
other Value

The other value

Return:

Value

public * multiply(other: Value): Value source

Computes the javascript expression value * other

Params:

NameTypeAttributeDescription
other Value

The other value

Return:

Value

public * not(): Value source

Computes the javascript expression !value

Return:

Value

public * notEquals(other: Value, realm: Realm): Value source

Computes the javascript expression !(value == other)

Params:

NameTypeAttributeDescription
other Value

The other value

realm Realm

The realm to use when creating resuls.

Return:

Value

public * pow(other: Value): Value source

Computes the value raised to the other power (value ** other)

Params:

NameTypeAttributeDescription
other Value

The other value

Return:

Value

public * shiftLeft(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public * shiftRight(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public * shiftRightZF(other: *): * source

Params:

NameTypeAttributeDescription
other *

Return:

*

public * subtract(other: Value): Value source

Computes the javascript expression value - other

Params:

NameTypeAttributeDescription
other Value

The other value

Return:

Value

public * toBooleanValue(): * source

Return:

*

public * toIntNative(): * source

Return:

*

public toJS(): * source

Deep copy this value to a native javascript value.

Return:

*

public abstract toNative(): * source

Converts this value to a native javascript value.

Return:

*

public * toNumberNative(): * source

Return:

*

public * toNumberValue() source

public * toPrimitiveNative(preferedType: *): * source

Params:

NameTypeAttributeDescription
preferedType *

Return:

*

public * toPrimitiveValue(preferedType: *) source

Params:

NameTypeAttributeDescription
preferedType *

public * toStringNative(): * source

Return:

*

public * toStringValue() source

public * toUIntNative(): * source

Return:

*

public * tripleEquals(other: Value, realm: Realm): Value source

Computes the javascript expression value === other

Params:

NameTypeAttributeDescription
other Value

The other value

realm Realm

The realm to use when creating resuls.

Return:

Value

public * typeOf(): Value source

Computes the javascript expression typeof value

Return:

Value

public * unaryMinus(): Value source

Computes the javascript expression -value

Return:

Value

public * unaryPlus(): Value source

Computes the javascript expression +value

Return:

Value