Libraries v5.2.0
    Preparing search index...

    Function deepForEachAsync

    • Visit plain records sequentially, parent before children, awaiting each visitor.

      Arrays, including nested arrays, are containers; primitives and opaque objects are ignored. Record children are selected from own array-valued properties. A shared record is visited at each occurrence; cycles on the active traversal path reject with TypeError. This helper does not copy or mutate input, though the visitor may mutate its records. Visitor failures reject immediately.

      Type Parameters

      • T extends object = Record<string, unknown>
      • TContext = undefined

      Parameters

      • input: unknown

        A record or an arbitrarily nested array of records.

      • visitor: (this: TContext, node: T) => unknown

        Synchronous or asynchronous work for each accepted record.

      • Optionalcontext: TContext

        Optional visitor this value.

      • options: DeepForEachAsyncOptions<T> = {}

        Child-array selection and subtree filtering.

      Returns Promise<void>