Checks if the source contains a specific value.
Type of items in the source.
Value to check for.
Optional function to compare values.
Collector that checks if the source contains a specific value.
const result = contains(2)([1, 2, 3]);console.log(result); // true Copy
const result = contains(2)([1, 2, 3]);console.log(result); // true
Checks if the source contains a specific value.