* Iterates through `array` by index and performs the callback on each element of array until the callback * returns a falsey value, then returns false. * If no such value is found, the callback is applied to each element of array and `true` is returned.
(array, callback)
| 490 | * If no such value is found, the callback is applied to each element of array and `true` is returned. |
| 491 | */ |
| 492 | function every(array, callback) { |
| 493 | if (array) { |
| 494 | for (var i = 0; i < array.length; i++) { |
| 495 | if (!callback(array[i], i)) { |
| 496 | return false; |
| 497 | } |
| 498 | } |
| 499 | } |
| 500 | return true; |
| 501 | } |
| 502 | ts.every = every; |
| 503 | function find(array, predicate) { |
| 504 | for (var i = 0; i < array.length; i++) { |
no test coverage detected
searching dependent graphs…