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

Function findInconsistentObjectKeys

keyserver/src/creators/report-creator.js:191–207  ·  view source on GitHub ↗
(
  first: { +[id: string]: O },
  second: { +[id: string]: O },
)

Source from the content-addressed store, hash-verified

189}
190
191function findInconsistentObjectKeys<O>(
192 first: { +[id: string]: O },
193 second: { +[id: string]: O },
194): Set<string> {
195 const nonMatchingIDs = new Set<string>();
196 for (const id in first) {
197 if (!_isEqual(first[id])(second[id])) {
198 nonMatchingIDs.add(id);
199 }
200 }
201 for (const id in second) {
202 if (!first[id]) {
203 nonMatchingIDs.add(id);
204 }
205 }
206 return nonMatchingIDs;
207}
208
209function getInconsistentThreadIDsFromReport(
210 request: ThreadInconsistencyReportCreationRequest,

Calls 1

addMethod · 0.65

Tested by

no test coverage detected