Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

_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;