• Checks if a value is an Iterable.

    Example

    Is String iterable?

    const result = isIterable("");
    console.log(result); // true

    Example

    Is Array iterable?

    const result = isIterable([]);
    console.log(result); // true

    Returns

    true if value is an Iterable, otherwise false

    Type Parameters

    • T

      the Iterable element type

    Parameters

    • value: unknown

      the value to check

    Returns value is Iterable<T>

Generated using TypeDoc