Function chain

  • Chain together several iterables.

    Type Parameters

    • T

    Parameters

    • Rest ...objects: Iterable<T>[]

      The iterable objects of interest.

    Returns IterableIterator<T>

    An iterator which yields the values of the iterables in the order in which they are supplied.

    Example

    import { chain } from '@lumino/algorithm';

    let data1 = [1, 2, 3];
    let data2 = [4, 5, 6];

    let stream = chain(data1, data2);

    Array.from(stream); // [1, 2, 3, 4, 5, 6]

    Deprecated