index.js 942 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * lodash 3.0.0 (Custom Build) <https://lodash.com/>
  3. * Build: `lodash modern modularize exports="npm" -o ./`
  4. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  5. * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
  6. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  7. * Available under MIT license <https://lodash.com/license>
  8. */
  9. /**
  10. * A specialized version of `_.forEach` for arrays without support for callback
  11. * shorthands or `this` binding.
  12. *
  13. * @private
  14. * @param {Array} array The array to iterate over.
  15. * @param {Function} iteratee The function invoked per iteration.
  16. * @returns {Array} Returns `array`.
  17. */
  18. function arrayEach(array, iteratee) {
  19. var index = -1,
  20. length = array.length;
  21. while (++index < length) {
  22. if (iteratee(array[index], index, array) === false) {
  23. break;
  24. }
  25. }
  26. return array;
  27. }
  28. module.exports = arrayEach;