* Like `forEach`, but iterates in reverse order.
(array, callback)
| 387 | * Like `forEach`, but iterates in reverse order. |
| 388 | */ |
| 389 | function forEachRight(array, callback) { |
| 390 | if (array) { |
| 391 | for (var i = array.length - 1; i >= 0; i--) { |
| 392 | var result = callback(array[i], i); |
| 393 | if (result) { |
| 394 | return result; |
| 395 | } |
| 396 | } |
| 397 | } |
| 398 | return undefined; |
| 399 | } |
| 400 | ts.forEachRight = forEachRight; |
| 401 | /** Like `forEach`, but suitable for use with numbers and strings (which may be falsy). */ |
| 402 | function firstDefined(array, callback) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…