src/util.js
function internalSearchObject (obj, searchTerm, seen, depth) {
  if (depth > SEARCH_MAX_DEPTH) {
    return false
  }
  let match = false
  const keys = Object.keys(obj)
  let key, value
  for (let i = 0; i < keys.length; i++) {
    key = keys[i]
    value = obj[key]
    match = internalSearchCheck(searchTerm, key, value, seen, depth + 1)
    if (match) {
      break
    }
  }
  return match
}
function internalSearchObject (obj, searchTerm, seen, depth) {
  if (depth > SEARCH_MAX_DEPTH) {
    return false
  }
  let match = false
  const keys = Object.keys(obj)
  let key, value
  for (let i = 0; i < keys.length; i++) {
    key = keys[i]
    value = obj[key]
    match = internalSearchCheck(searchTerm, key, value, seen, depth + 1)
    if (match) {
      break
    }
  }
  return match
}
function internalSearchObject ( obj , searchTerm , seen , depth ) { if ( depth > SEARCH_MAX_DEPTH ) { return false } let match = false const keys = Object . keys ( obj ) let key , value for ( let i = 0 ; i < keys . length ; i ++ ) { key = keys [ i ] value = obj [ key ] match = internalSearchCheck ( searchTerm , key , value , seen , depth + 1 ) if ( match ) { break } } return match }
Executes a search on each field of the provided object
@param {*} obj 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 field of the provided object