import { includes } from "https://deno.land/x/core_fn@v1.0.0-beta.16/uncurry/common/includes.ts";
Checks if value is in collection.
Examples
Example 1
Example 1
includes('lo', 'hello') // true
includes(3, [1, 2, 3]) // true
includes(20, new Uint8Array([10, 20, 30, 40, 50])) // true
type
<T extends string | readonly unknown[] | TypedArray>(val: T extends string ? string : T[number], collection: T) => boolean