ixfx
    Preparing search index...
    • Returns a projection of node as a dynamic traversable. This means that the tree structure is dynamically created as last-minute as possible.

      Note that the object identity of TraversableTree return results is not stable. This is because they are created on-the-fly by reading fields of node.

      const c1 = [ ...asDynamicTraversable(someObject).children() ];
      const c2 = [ ...asDynamicTraversable(someObject).children() ];

      // Object identity is not the same
      c1[ 0 ] === c1[ 0 ]; // false
      // ...even though its referring to the same value
      c1[ 0 ].getValue() === c1[ 0 ].getValue(); // true

      Instead .getIdentity() to get a stable identity:

      c1[ 0 ].getIdentity() === c2[ 0 ].getIdentity(); // true
      

      Type Parameters

      • Textendsobject

      Parameters

      • node: T

        Object to read

      • options: Partial<Readonly<{ filter: "none" | "leaves" | "branches"; name: string }>> = {}

        Options when creating traversable

      • ancestors: string[] = []

        Do not use

      • Optionalparent: TraversableTree<Readonly<{ ancestors: string[]; name: string; value: any }>>

        Do not use

      Returns TraversableTree<Readonly<{ ancestors: string[]; name: string; value: any }>>