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

Function keysByCollection

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

Source from the content-addressed store, hash-verified

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

Callers 1

deleteManyImplFunction · 0.85

Calls 2

setMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected