src/util.js
function internalSearchArray (array, searchTerm, seen, depth) {
  if (depth > SEARCH_MAX_DEPTH) {
    return false
  }
  let match = false
  let value
  for (let i = 0; i < array.length; i++) {
    value = array[i]
    match = internalSearchCheck(searchTerm, null, value, seen, depth + 1)
    if (match) {
      break
    }
  }
  return match
}
function internalSearchArray (array, searchTerm, seen, depth) {
  if (depth > SEARCH_MAX_DEPTH) {
    return false
  }
  let match = false
  let value
  for (let i = 0; i < array.length; i++) {
    value = array[i]
    match = internalSearchCheck(searchTerm, null, value, seen, depth + 1)
    if (match) {
      break
    }
  }
  return match
}
function internalSearchArray ( array , searchTerm , seen , depth ) { if ( depth > SEARCH_MAX_DEPTH ) { return false } let match = false let value for ( let i = 0 ; i < array . length ; i ++ ) { value = array [ i ] match = internalSearchCheck ( searchTerm , null , value , seen , depth + 1 ) if ( match ) { break } } return match }
Executes a search on each value of the provided array
@param {*} array Search target
@param {string} searchTerm Search string
@param {Map<any,boolean>} seen Map containing the search result to prevent stack overflow by walking on the same object multiple times
@param {number} depth Deep search depth level, which is capped to prevent performance issues
@returns {boolean} Search match
Executes a search on each value of the provided array