ixfx
    Preparing search index...

    Function forEach

    • Execute function f for each item in iterable. If f returns false, iteration stops.

      forEach(iterable, v => {
      // do something with value
      });

      When using an async iterable, fn can also be async.

      Type Parameters

      • T

      Parameters

      • it: T[] | AsyncIterable<T, any, any> | Iterable<T, any, any>

        Iterable or array

      • fn: (v: undefined | T) => boolean | void | Promise<void> | Promise<boolean>

        Function to execute

      • options: Partial<ForEachOptions> = {}

      Returns undefined | Promise<void>