Skip to content

includes

ts
function Array.includes<T>(
    target: readonly T[],
    value: NoInfer<T>,
): boolean

Returns true if array contains value, otherwise returns false.

Example

ts
import { Array } from "@monstermann/array";

Array.includes([1, 2, 3, 4], 3); // true
ts
import { Array } from "@monstermann/array";

pipe([1, 2, 3, 4], Array.includes(3)); // true