/*
Check whether an array contains any stream values.

@private
@for Ember.stream
@function scanArray
@param {Array} array Array given to a handlebars helper.
@return {Boolean} `true` if the array contains a stream/bound value, `false`
otherwise.
19176
function scanArray(array) {
    var length = array.length;
    var containsStream = false;

    for (var i = 0; i < length; i++) {
      if (isStream(array[i])) {
        containsStream = true;
        break;
      }
    }

    return containsStream;
  }
1050751
function parseArray(array) {
  const templates = array.map(parse);
  const templateParameters = templates.reduce(
    (parameters, template) => parameters.concat(template.parameters),
    []
  );
  const templateFn = context => templates.map(template => template(context));

  return Template(templateFn, templateParameters);
}
1117279
function arrayHasValue(arr, value) {
        var idx = arr.indexOf(value);
        if (idx !== -1) {
            return true;
        }
        return false;
    }
784130
public static <T extends Object> boolean arraryContains(T[] array, T value) {
		
		// Si le tableau est vide
		if(array == null || array.length == 0) {
			
			// On retourne false
			return false;
		}
		
		// Si le mode est vide
		if(value == null) {
			
			// On retourne false
			return false;
		}
			
		// Mode dedans
		boolean modeIn = false;
		
		// Index du Tableau
		int index = 0;
		
		// Parcours
		while(index < array.length && !modeIn) {
			
			// Valeur du Tableau
			T tValue = array[index++];
			
			modeIn = tValue.equals(value);
		}
		
		// On retourne false
		return modeIn;
	}
680379
function inarray (list, item) {
  list = Object.prototype.toString.call(list) === '[object Array]' ? list : []

  var idx = -1
  var end = list.length

  while (++idx < end) {
    if (list[idx] === item) return true
  }

  return false
}
751712
function(array, pred) {
      return _.filter(_.map(_.range(_.size(array)), function(i) {
        return pred(i, array[i]);
      }),
      existy);
    }
170694
private static boolean contains(Object[] arr, Object obj) {
	for (Object o : arr) {
	    if (o.equals(obj)) return true;
	}
	return false;
    }
572670
function contains(val) {
        var type = toString.call(val);
        if (map[type] === undefined)
            return false;

        var key = hash('' + val);
        if (map[type][key] === undefined)
            return false;

        var arr = map[type][key];
        for (var i = 0; i < arr.length; ++i) {
            if (arr[i] === val) return true;
        }

        return false;
    }
1092116
function find(array, exp) {
  return (isArray(array) && isDefined(exp))
    //return the member and not an array like `first`
    ? findInArray(array, $parse(exp), false)
    : array;
}
1280499
function (query, array, exact) {
        if (!_.isArray(array) || array.length === 0) {
          return false;
        }
        return array.some(function (string) {
          if (exact) {
            return query.toLowerCase() === string.toLowerCase();
          }
          return string.toLowerCase().indexOf(query.toLowerCase()) !== -1;
        });
      }
802175
function arrayFilterEmpty($array)
    {
        $rest = array_filter($array);
        if (empty($rest)) {

            return true;
        }

        foreach ($rest as $key => $value) {
            if ( ! is_array($value) && ! empty($value)) {
                return false;
            }

            if (is_array($value)) {
                if (empty(array_filter($value))) {
                    $rest[$key] = true;
                } else {
                    $rest[$key] = $this->arrayFilterEmpty($value);
                }
            } else {
                $rest[$key] = false;
            }
        }

        return ! in_array(false, $rest);
    }
1246452
private static boolean contains(Object[] arr, Object member) {
        for (Object mem : arr) {
            if (Objects.equals(mem, member)) {
                return true;
            }
        }
        return false;
    }
1038337
function isPrimitiveArray( value ) {
	var len;
	if ( !isArray( value ) ) {
		return false;
	}
	len = value.length;
	if ( !len ) {
		return false;
	}
	for ( var i = 0; i < len; i++ ) {
		if ( !isPrimitive( value[i] ) ) {
			return false;
		}
	}
	return true;
}
1069146
function contains(array, item) {
  if (array && array.length && item) {
    return array.indexOf(item) !== -1;
  }
  return false;
}
169818
function isFunctionArray( value ) {
	var len, i;
	if ( !isArray( value ) ) {
		return false;
	}
	len = value.length;
	if ( !len ) {
		return false;
	}
	for ( i = 0; i < len; i++ ) {
		if ( !isFunction( value[i] ) ) {
			return false;
		}
	}
	return true;
}
1317333
private static boolean isPrimitiveArray(String key, String[] values) {
        return key.endsWith(array) || values.length > 1;
    }
891668
function isEmpty (value) {
    if (Array.isArray(value)) {
        return value.length === 0
    } else if (typeof value === 'object') {
        if (value) {
            for (const _ in value) {
                return false
            }
        }
        return true
    } else {
        return !value
    }
}