code: function inArray(src, find, deep) {
      if (deep) {
        for (var i = 0, len = src.length; i < len; i++) { // Array.findIndex
          if (Object.keys(find).every(function(key) { return src[i][key] === find[key]; })) {
            return i;
          }
        }
        return -1;
      }
  
      if (src.indexOf) {
        return src.indexOf(find);
      } else {
        for (var i = 0, len = src.length; i < len; i++) {
          if (src[i] === find) {
            return i;
          }
        }
        return -1;
      }
    }
docs: find if a array contains the object using indexOf or a simple polyfill
  @param {String} src
  @param {String} find
  @return {Boolean|Number} false when not found, or the index