Function includes

  • Tries to find the given searchItem in iterable or asynchronous iterable.

    Example

    const includesTwo = includes(2);
    includesTwo([1, 2, 3, 4]); // true
    includesTwo([1, 3, 5, 7]); // false

    Type Parameters

    • SearchItem

    Parameters

    • searchItem: SearchItem

      Item to search.

    Returns (<Iterable>(iterable) => ReducerOutput<Iterable, boolean>)

    Curried function with searchItem set in context.

      • <Iterable>(iterable): ReducerOutput<Iterable, boolean>
      • Type Parameters

        • Iterable extends IsomorphicIterable

        Parameters

        • iterable: Iterable

        Returns ReducerOutput<Iterable, boolean>