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

Function keysByCollection

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

Source from the content-addressed store, hash-verified

1258 });
1259
1260 const keysByCollection = (
1261 entries: readonly { readonly collection: string; readonly key: string }[],
1262 ) => {
1263 const grouped = new Map<string, Set<string>>();
1264 for (const entry of entries) {
1265 const keys = grouped.get(entry.collection);
1266 if (keys) {
1267 keys.add(entry.key);
1268 } else {
1269 grouped.set(entry.collection, new Set([entry.key]));
1270 }
1271 }
1272 return grouped;
1273 };
1274
1275 const deleteManyImpl = (
1276 owner: Owner,

Callers 1

deleteManyImplFunction · 0.85

Calls 2

setMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected