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

Function keysByCollection

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

Source from the content-addressed store, hash-verified

1597 });
1598
1599 const keysByCollection = (
1600 entries: readonly { readonly collection: string; readonly key: string }[],
1601 ) => {
1602 const grouped = new Map<string, Set<string>>();
1603 for (const entry of entries) {
1604 const keys = grouped.get(entry.collection);
1605 if (keys) {
1606 keys.add(entry.key);
1607 } else {
1608 grouped.set(entry.collection, new Set([entry.key]));
1609 }
1610 }
1611 return grouped;
1612 };
1613
1614 const deleteManyImpl = (
1615 owner: Owner,

Callers 1

deleteManyImplFunction · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected