Package: effect
Module: Array
Checks whether an array contains a value, using Equal.equivalence() for
comparison.
When to use
Use to check whether an iterable contains a value using Effect’s default equality instead of providing a comparison function.
Example (Checking membership)
import { Array, pipe } from "effect"
console.log(pipe(["a", "b", "c", "d"], Array.contains("c"))) // true
See
containsWith — use custom equalitySignature
declare const contains: { <A>(a: A): (self: Iterable<A>) => boolean; <A>(self: Iterable<A>, a: A): boolean; }
Since v2.0.0