@json-schema-tools/traverse
    Preparing search index...

    Function traverseInternal

    • Traverse all subschema of a schema, calling the mutator function with each. The mutator is called on leaf nodes first.

      Parameters

      • schema: JSONSchema

        the schema to traverse

      • mutation: MutationFunction

        the function to pass each node in the subschema tree.

      • traverseOptions: TraverseOptions

        a set of options for traversal.

      • depth: number

        For internal use. Tracks the current recursive depth in the tree. This is used to implement some of the options.

      • recursiveStack: JSONSchema[]
      • mutableStack: JSONSchema[]
      • pathStack: PathSegment[]
      • prePostMap: [JSONSchema, JSONSchema][]
      • cycleSet: JSONSchema[]
      • replacements: Map<JSONSchema, JSONSchema>
      • childLocations: Map<JSONSchema, PathSegment[][]> = ...
      • additionalPaths: PathSegment[][] = []

      Returns JSONSchema | Promise<JSONSchema>