Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_arrayIncludes.js 526B

1234567891011121314151617
  1. var baseIndexOf = require('./_baseIndexOf');
  2. /**
  3. * A specialized version of `_.includes` for arrays without support for
  4. * specifying an index to search from.
  5. *
  6. * @private
  7. * @param {Array} [array] The array to inspect.
  8. * @param {*} target The value to search for.
  9. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  10. */
  11. function arrayIncludes(array, value) {
  12. var length = array == null ? 0 : array.length;
  13. return !!length && baseIndexOf(array, value, 0) > -1;
  14. }
  15. module.exports = arrayIncludes;