core/src/ons/gesture-detector.js
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;
    }
  }
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;
    }
  }
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 ; } }
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
find if a array contains the object using indexOf or a simple polyfill