includes(item)
Indicate if the Enumerable contains the given element. This is the equivalent of Array.prototype.includes
Arguments
- item (any): element to search for
Returns
(boolean): indicate if the Enumerable contains the given element.
Example
const data = [
{ foo: 'bar' },
{ x: 'y' },
{ a: 'b' },
];
Enumerable
.from(data)
.includes({ foo: 'bar' })
.toArray();
// true