MCPcopy Create free account
hub / github.com/CommE2E/comm / serverEntryInfosObject

Function serverEntryInfosObject

lib/shared/entry-utils.js:228–242  ·  view source on GitHub ↗
(
  array: $ReadOnlyArray<RawEntryInfo>,
)

Source from the content-addressed store, hash-verified

226}
227
228function serverEntryInfosObject(
229 array: $ReadOnlyArray<RawEntryInfo>,
230): RawEntryInfos {
231 const obj: { [string]: RawEntryInfo } = {};
232 for (const rawEntryInfo of array) {
233 const entryInfo = serverEntryInfo(rawEntryInfo);
234 if (!entryInfo) {
235 continue;
236 }
237 const { id } = entryInfo;
238 invariant(id, 'should be set');
239 obj[id] = entryInfo;
240 }
241 return obj;
242}
243
244export {
245 entryKey,

Callers 5

fetchFunction · 0.90
findStoreInconsistenciesFunction · 0.90
getEntryInfosHashFunction · 0.90
getEntryIDsFunction · 0.90

Calls 1

serverEntryInfoFunction · 0.85

Tested by

no test coverage detected