Skip to main content
Module

x/core_fn/uncurry/mod.ts>includes

A collection of built-in object method and property as currying function
Latest
variable includes
import { includes } from "https://deno.land/x/core_fn@v1.0.0-beta.16/uncurry/mod.ts";

Checks if value is in collection.

Examples

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