()
| 41 | } |
| 42 | |
| 43 | export function chapterCoverage() { |
| 44 | return afmlDocsState.chapters.map((chapter) => { |
| 45 | const total = chapter.sections.length; |
| 46 | const done = chapter.sections.filter((section) => section.status === "done").length; |
| 47 | const inProgress = chapter.sections.filter((section) => section.status === "in_progress").length; |
| 48 | const pending = total - done - inProgress; |
| 49 | |
| 50 | return { |
| 51 | ...chapter, |
| 52 | total, |
| 53 | done, |
| 54 | inProgress, |
| 55 | pending, |
| 56 | completionPct: total === 0 ? 0 : Math.round((done / total) * 100), |
| 57 | }; |
| 58 | }); |
| 59 | } |
nothing calls this directly
no outgoing calls
no test coverage detected