Function isAsyncIterable

  • Check if given value is AsyncIterable.

    Not to be confused with isAsynchronousIterable which checks for both AsyncIterable and Iterable.

    Example

    isAsyncIterable((async function * () { yield* [] })()); // true
    isAsyncIterable([]); // false
    isAsyncIterable({}); // false

    Returns

    true when is an AsyncIterable, false otherwise.

    Type Parameters

    • Actual

    • Item

    Parameters

    • input: Actual | AsyncIterable<Item>

      Value to check.

    Returns input is AsyncIterable<Item>