Function toArray

  • Create an array from an iterable of values.

    Type Parameters

    • T

    Parameters

    • object: Iterable<T>

      The iterable object of interest.

    Returns T[]

    A new array of values from the given object.

    Example

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

    let stream = [1, 2, 3, 4, 5, 6][Symbol.iterator]();

    toArray(stream); // [1, 2, 3, 4, 5, 6];

    Deprecated