(proof, id)
| 47 | } |
| 48 | |
| 49 | function checkById(proof, id) { |
| 50 | return proof.checks.find((check) => check.id === id) || { |
| 51 | id, |
| 52 | status: 'fail', |
| 53 | detail: 'missing check', |
| 54 | evidence: [], |
| 55 | }; |
| 56 | } |
| 57 | |
| 58 | function criterion(id, label, status, detail, evidence = []) { |
| 59 | return { id, label, status, detail, evidence }; |