(iter, currentDepth)
| 730 | let iterations = 0; |
| 731 | let stopped = false; |
| 732 | function flatDeep(iter, currentDepth) { |
| 733 | iter.__iterate((v, k) => { |
| 734 | if ((!depth || currentDepth < depth) && isCollection(v)) { |
| 735 | flatDeep(v, currentDepth + 1); |
| 736 | } else { |
| 737 | iterations++; |
| 738 | if (fn(v, useKeys ? k : iterations - 1, flatSequence) === false) { |
| 739 | stopped = true; |
| 740 | } |
| 741 | } |
| 742 | return !stopped; |
| 743 | }, reverse); |
| 744 | } |
| 745 | flatDeep(collection, 0); |
| 746 | return iterations; |
| 747 | }; |
no test coverage detected