QuickBEAM.VM.ObjectModel.Private (QuickBEAM v0.10.9)

Copy Markdown View Source

Private class fields and brand checks: get, put, and in operator support for #field syntax.

Summary

Functions

Attaches a private brand to an object or constructor.

Returns the private brands attached to a target.

Defines or overwrites a private field on an object or constructor.

Checks that a target carries a private brand.

Returns whether a target has a private field.

Creates an internal symbol for a JavaScript private name.

Functions

add_brand(ctor, brand)

Attaches a private brand to an object or constructor.

brand_error()

brands(ctor)

Returns the private brands attached to a target.

define_field!(ctor, key, val)

Defines or overwrites a private field on an object or constructor.

ensure_brand(target, brand)

Checks that a target carries a private brand.

get_field(ctor, key)

has_brand?(target, brand)

has_field?(target, key)

Returns whether a target has a private field.

private_symbol(name)

Creates an internal symbol for a JavaScript private name.

put_field!(target, key, val)