MCPcopy Create free account
hub / github.com/TanStack/db / hasLoadedIds

Function hasLoadedIds

packages/db-collection-e2e/src/utils/helpers.ts:59–65  ·  view source on GitHub ↗
(
  collection: Collection<T>,
  ids: Array<string>,
)

Source from the content-addressed store, hash-verified

57 * Check if a collection has loaded specific IDs
58 */
59export function hasLoadedIds<T extends { id: string }>(
60 collection: Collection<T>,
61 ids: Array<string>,
62): boolean {
63 const loadedIds = getLoadedIds(collection)
64 return ids.every((id) => loadedIds.includes(id))
65}
66
67/**
68 * Check if a collection has ONLY loaded specific IDs (no extras)

Callers

nothing calls this directly

Calls 1

getLoadedIdsFunction · 0.85

Tested by

no test coverage detected