* Iterates through 'array' by index and performs the callback on each element of array until the callback * returns a truthy value, then returns that value. * If no such value is found, the callback is applied to each element of array and undefined is returned.
(array, callback)
| 372 | * If no such value is found, the callback is applied to each element of array and undefined is returned. |
| 373 | */ |
| 374 | function forEach(array, callback) { |
| 375 | if (array) { |
| 376 | for (var i = 0; i < array.length; i++) { |
| 377 | var result = callback(array[i], i); |
| 378 | if (result) { |
| 379 | return result; |
| 380 | } |
| 381 | } |
| 382 | } |
| 383 | return undefined; |
| 384 | } |
| 385 | ts.forEach = forEach; |
| 386 | /** |
| 387 | * Like `forEach`, but iterates in reverse order. |
nothing calls this directly
no test coverage detected
searching dependent graphs…