main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
535 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * A specialized version of `_.forEach` for arrays without support for
|
---|
3 | * iteratee shorthands.
|
---|
4 | *
|
---|
5 | * @private
|
---|
6 | * @param {Array} [array] The array to iterate over.
|
---|
7 | * @param {Function} iteratee The function invoked per iteration.
|
---|
8 | * @returns {Array} Returns `array`.
|
---|
9 | */
|
---|
10 | function arrayEach(array, iteratee) {
|
---|
11 | var index = -1,
|
---|
12 | length = array == null ? 0 : array.length;
|
---|
13 |
|
---|
14 | while (++index < length) {
|
---|
15 | if (iteratee(array[index], index, array) === false) {
|
---|
16 | break;
|
---|
17 | }
|
---|
18 | }
|
---|
19 | return array;
|
---|
20 | }
|
---|
21 |
|
---|
22 | export default arrayEach;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.