Skip to main content

includes

Checks if value is in collection. If collection is a string, it’s checked for a substring of value.

API

function includes<T>(array: T[], value: any): boolean;

Usage

import { includes } from "@feedzai/js-utilities";

includes([1, 2, 3], 1)
// => true