Function length

  • Get the length of an iterable or asynchronous iterable.

    Example

    length([1, 2, 3]); // 3
    

    Returns

    Promise with the length of the iterable.

    Type Parameters

    • Iterable extends AsynchronousIterable<unknown>

    Parameters

    • iterable: Iterable

      Iterable or asynchronous iterable to get the length from.

    Returns ReducerOutput<Iterable, number>