Print a labelled list of skills (nothing if empty), each line uniformly coloured.
( result: SkillsCheckResult, status: SkillDiff["status"], title: string, mark: string, color: (s: string) => string, )
| 227 | |
| 228 | /** Print a labelled list of skills (nothing if empty), each line uniformly coloured. */ |
| 229 | function printSkillSection( |
| 230 | result: SkillsCheckResult, |
| 231 | status: SkillDiff["status"], |
| 232 | title: string, |
| 233 | mark: string, |
| 234 | color: (s: string) => string, |
| 235 | ): void { |
| 236 | const items = result.skills.filter((s) => s.status === status); |
| 237 | if (!items.length) return; |
| 238 | console.log(); |
| 239 | console.log(` ${color(title)}`); |
| 240 | for (const s of items) console.log(` ${color(`${mark} ${s.name}`)}`); |
| 241 | } |
| 242 | |
| 243 | function renderCheck(result: SkillsCheckResult): void { |
| 244 | const { summary } = result; |