MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / keysByCollection

Function keysByCollection

packages/core/sdk/src/executor.ts:1538–1551  ·  view source on GitHub ↗
(
    entries: readonly { readonly collection: string; readonly key: string }[],
  )

Source from the content-addressed store, hash-verified

1536 });
1537
1538 const keysByCollection = (
1539 entries: readonly { readonly collection: string; readonly key: string }[],
1540 ) => {
1541 const grouped = new Map<string, Set<string>>();
1542 for (const entry of entries) {
1543 const keys = grouped.get(entry.collection);
1544 if (keys) {
1545 keys.add(entry.key);
1546 } else {
1547 grouped.set(entry.collection, new Set([entry.key]));
1548 }
1549 }
1550 return grouped;
1551 };
1552
1553 const deleteManyImpl = (
1554 owner: Owner,

Callers 1

deleteManyImplFunction · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected