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

Function keysByCollection

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

Source from the content-addressed store, hash-verified

1288 });
1289
1290 const keysByCollection = (
1291 entries: readonly { readonly collection: string; readonly key: string }[],
1292 ) => {
1293 const grouped = new Map<string, Set<string>>();
1294 for (const entry of entries) {
1295 const keys = grouped.get(entry.collection);
1296 if (keys) {
1297 keys.add(entry.key);
1298 } else {
1299 grouped.set(entry.collection, new Set([entry.key]));
1300 }
1301 }
1302 return grouped;
1303 };
1304
1305 const deleteManyImpl = (
1306 owner: Owner,

Callers 1

deleteManyImplFunction · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected