@szilanor/stream
    Preparing search index...

    Variable flattenConst

    flatten: <T>() => OperationFunction<Iterable<T, any, any>, T> = flat

    Type declaration

      • <T>(): OperationFunction<Iterable<T, any, any>, T>
      • Returns a Stream that yields elements from the source that are Iterable and flattens them.

        Type Parameters

        • T

          Type of items in the source.

        Returns OperationFunction<Iterable<T, any, any>, T>

        Operation that yields elements from the source that are Iterable and flattens them.

        const result = flat<number>()([[1, 2], [3, 4]]);
        console.log([...result]); // [1, 2, 3, 4]