MCPcopy Index your code
hub / github.com/OpenSIST/OpenSIST.github.io / normalizeRecordList

Function normalizeRecordList

src/Data/RecordData.js:95–102  ·  view source on GitHub ↗
(records)

Source from the content-addressed store, hash-verified

93}
94
95function normalizeRecordList(records) {
96 const recordList = Array.isArray(records) ? records : Object.values(records ?? {});
97 return Object.fromEntries(
98 recordList
99 .filter(isRecordData)
100 .map((record) => [record.RecordID, record])
101 );
102}
103
104function isRecordData(record) {
105 return Boolean(record?.RecordID && record?.ApplicantID && record?.ProgramID);

Callers 3

getRecordsFunction · 0.85
setRecordsFunction · 0.85
readFreshCachedRecordsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected