Base class for all kinds of objects stored in an EDB.

Hierarchy (View Summary)

Accessors

Methods

Accessors

  • get name(): undefined | string
  • The name of the object.

    Returns undefined | string

  • get type(): undefined | string | readonly string[]
  • The object sub-type.

    Returns undefined | string | readonly string[]

Methods

  • Iterate over the attributes of an object.

    Returns Generator<[string, string | readonly string[]], void, any>

    for (const [name, value] of obj.attributes()) {
    if (typeof value === "string") {
    console.log(`${name} = ${value}`);
    } else {
    console.log(`${name} = [${value.join(", ")}]`);
    }
    }
  • Get the value of an attribute.

    Parameters

    • name: string

      the name of the attribute.

    Returns undefined | string | string[]

    the value(s) of the attribute if it exists, or undefined if the object does not have an attribute with the given name. In case the object has multiple attributes with the same name, an array with the values is returned instead of a single string.