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

Function keysByCollection

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

Source from the content-addressed store, hash-verified

1630 });
1631
1632 const keysByCollection = (
1633 entries: readonly { readonly collection: string; readonly key: string }[],
1634 ) => {
1635 const grouped = new Map<string, Set<string>>();
1636 for (const entry of entries) {
1637 const keys = grouped.get(entry.collection);
1638 if (keys) {
1639 keys.add(entry.key);
1640 } else {
1641 grouped.set(entry.collection, new Set([entry.key]));
1642 }
1643 }
1644 return grouped;
1645 };
1646
1647 const deleteManyImpl = (
1648 owner: Owner,

Callers 1

deleteManyImplFunction · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected