API Reference

Returns a boolean of whether or not an object is a member of an array

function isObjectInArray(obj: Object, arr: Object[])

// Example:

const arrayItems = [
        { x: 1, y: 1 },
        { x: 2, y: 2 },
        { x: 3, y: 3 },
      ]

isObjectInArray({ x: 2, y: 2 }, arrayItems) //=> true