Traqula
    Preparing search index...

    Class TransformerObject

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    defaultContext: TransformContext = {}
    maxStackSize: number = 1_000_000

    Methods

    • Recursively transforms all objects that are not arrays. Mapper is called on deeper objects first.

      Parameters

      • startObject: object

        object to start iterating from

      • mapper: (copy: object, orig: object) => unknown

        mapper to transform the various objects - argument is a copy of the original

      • preVisitor: (orig: object) => TransformContext = ...

        callback that is evaluated before iterating deeper. If continues is false, we do not iterate deeper, current object is still mapped. - default: true If shortcut is true, we do not iterate deeper, nor do we branch out, this mapper will be the last one called.

        • Default false

      Returns unknown

    • Visitor that visits all objects. Visits deeper objects first.

      Parameters

      • startObject: object
      • visitor: (orig: object) => void
      • preVisitor: (orig: object) => VisitContext = ...

      Returns void