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

Function keysByCollection

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

Source from the content-addressed store, hash-verified

1250 });
1251
1252 const keysByCollection = (
1253 entries: readonly { readonly collection: string; readonly key: string }[],
1254 ) => {
1255 const grouped = new Map<string, Set<string>>();
1256 for (const entry of entries) {
1257 const keys = grouped.get(entry.collection);
1258 if (keys) {
1259 keys.add(entry.key);
1260 } else {
1261 grouped.set(entry.collection, new Set([entry.key]));
1262 }
1263 }
1264 return grouped;
1265 };
1266
1267 const deleteManyImpl = (
1268 owner: Owner,

Callers 1

deleteManyImplFunction · 0.85

Calls 2

setMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected