(value, matches)
| 33 | } |
| 34 | |
| 35 | function collectUsageCandidate(value, matches) { |
| 36 | if (!value || typeof value !== "object") { |
| 37 | return; |
| 38 | } |
| 39 | |
| 40 | const normalized = normalizeUsageCandidate(value); |
| 41 | if (normalized) { |
| 42 | matches.push(normalized); |
| 43 | } |
| 44 | |
| 45 | if (Array.isArray(value)) { |
| 46 | for (const item of value) { |
| 47 | collectUsageCandidate(item, matches); |
| 48 | } |
| 49 | return; |
| 50 | } |
| 51 | |
| 52 | for (const nested of Object.values(value)) { |
| 53 | collectUsageCandidate(nested, matches); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | function extractLatestUsage(events) { |
| 58 | const matches = []; |
no test coverage detected