Class: Tree

Tree()

A class that enables navigation from child properties to parent. WIP - currently figuring out how to make new properties. For all purposes this functions as intended, but it doesn't print well in the console. It even perserves prototypes.

Constructor

new Tree()

Constructs a new Tree instance.

Properties:
Name Type Description
* Branch | Leaf

Properties.

Source:

Methods

(static) from(obj) → {Tree}

Attempt to create a tree from an existing object.

Parameters:
Name Type Description
obj Object

The object to convert to a tree.

Source:
Throws:

You probably passed it a primitive.

Type
TypeError
Returns:

The resulting tree.

Type
Tree

__raw__() → {Object}

Get the raw value of the tree, without all that proxy stuff.

Source:
Returns:

The raw object. Please not that objects will not be the same instances.

Type
Object