(recordIDs, isRefresh = false, {priority = FOREGROUND_PRIORITY} = {})
| 47 | } |
| 48 | |
| 49 | export async function getRecordByRecordIDs(recordIDs, isRefresh = false, {priority = FOREGROUND_PRIORITY} = {}) { |
| 50 | const uniqueRecordIDs = [...new Set(recordIDs)].filter(Boolean); |
| 51 | if (uniqueRecordIDs.length === 0) { |
| 52 | return {}; |
| 53 | } |
| 54 | const records = await getRecords(isRefresh, {priority}); |
| 55 | return Object.fromEntries(uniqueRecordIDs.flatMap((recordId) => ( |
| 56 | isRecordData(records[recordId]) ? [[recordId, records[recordId]]] : [] |
| 57 | ))); |
| 58 | } |
| 59 | |
| 60 | export async function getRecords(isRefresh = false, {priority = FOREGROUND_PRIORITY} = {}) { |
| 61 | return await loadCachedValue({ |
no test coverage detected