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

Function keysByCollection

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

Source from the content-addressed store, hash-verified

1616 });
1617
1618 const keysByCollection = (
1619 entries: readonly { readonly collection: string; readonly key: string }[],
1620 ) => {
1621 const grouped = new Map<string, Set<string>>();
1622 for (const entry of entries) {
1623 const keys = grouped.get(entry.collection);
1624 if (keys) {
1625 keys.add(entry.key);
1626 } else {
1627 grouped.set(entry.collection, new Set([entry.key]));
1628 }
1629 }
1630 return grouped;
1631 };
1632
1633 const deleteManyImpl = (
1634 owner: Owner,

Callers 1

deleteManyImplFunction · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected