xaa
    Preparing search index...

    Function each

    • async version of array.forEach

      • iterate through array and await call func with each element and index

      Sample:

      await xaa.each([1, 2, 3], async val => await xaa.delay(val))
      

      Type Parameters

      • T

      Parameters

      • array: readonly T[]

        array to each

      • func: Consumer<T>

        callback for each

      Returns Promise<T[]>