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

Function keysByCollection

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

Source from the content-addressed store, hash-verified

1012 });
1013
1014 const keysByCollection = (
1015 entries: readonly { readonly collection: string; readonly key: string }[],
1016 ) => {
1017 const grouped = new Map<string, Set<string>>();
1018 for (const entry of entries) {
1019 const keys = grouped.get(entry.collection);
1020 if (keys) {
1021 keys.add(entry.key);
1022 } else {
1023 grouped.set(entry.collection, new Set([entry.key]));
1024 }
1025 }
1026 return grouped;
1027 };
1028
1029 const deleteManyImpl = (
1030 owner: Owner,

Callers 1

deleteManyImplFunction · 0.85

Calls 2

setMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected