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

Function keysByCollection

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

Source from the content-addressed store, hash-verified

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

Callers 1

deleteManyImplFunction · 0.85

Calls 2

setMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected