function (v, search, val) {
  var defined = Object.create(null)
  defined.is = false
  defined.count = 0
  var length = v.length
  var i
  for (i = 0; i < length; i++) {
    if (isDefine(v[i][search])) {
      if (isDefine(val) && v[i][search] === val) {
        defined.is = true
        defined.count += 1
      }
    }
  }
  return defined
}
function (v, search, val) {
  var defined = Object.create(null)
  defined.is = false
  defined.count = 0
  var length = v.length
  var i
  for (i = 0; i < length; i++) {
    if (isDefine(v[i][search])) {
      if (isDefine(val) && v[i][search] === val) {
        defined.is = true
        defined.count += 1
      }
    }
  }
  return defined
}
function ( v , search , val ) { var defined = Object . create ( null ) defined . is = false defined . count = 0 var length = v . length var i for ( i = 0 ; i < length ; i ++ ) { if ( isDefine ( v [ i ] [ search ] ) ) { if ( isDefine ( val ) && v [ i ] [ search ] === val ) { defined . is = true defined . count += 1 } } } return defined }
return object{is → boolen, count → number}
- check object has defined in array
return object { is → boolen count → number } - check object has defined in array