Total Complexity | 1 |
Complexity/F | 0 |
Lines of Code | 14 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { Assessment } from "../../models/types"; |
||
2 | |||
3 | const getUniqueAssessmentTypes = (assessments: Assessment[]): number[] => { |
||
4 | const uniqueIds: number[] = []; |
||
5 | assessments.forEach((assessment) => { |
||
6 | if (!uniqueIds.includes(assessment.assessment_type_id)) { |
||
7 | uniqueIds.push(assessment.assessment_type_id); |
||
8 | } |
||
9 | }); |
||
10 | return uniqueIds; |
||
11 | }; |
||
12 | // eslint-disable-next-line import/prefer-default-export |
||
13 | export { getUniqueAssessmentTypes }; |
||
14 |