Latest
function includes
import { includes } from "https://dotland.deno.dev/x/lodash_es@v0.0.2/src/collection.js";

Checks if value is in collection. If collection is a string, it's checked for a substring of value, otherwise SameValueZero is used for equality comparisons. If fromIndex is negative, it's used as the offset from the end of collection.

Examples

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

_.includes([1, 2, 3], 1, 2); // => false

_.includes({ 'a': 1, 'b': 2 }, 1); // => true

_.includes('abcd', 'bc'); // => true

Parameters

collection

The collection to inspect.

value

The value to search for.

fromIndex
guard