MCPcopy Index your code
hub / github.com/TanStack/db / getLoadedIds

Function getLoadedIds

packages/db-collection-e2e/src/utils/helpers.ts:41–45  ·  view source on GitHub ↗
(
  collection: Collection<T>,
)

Source from the content-addressed store, hash-verified

39 * Get all loaded item IDs from a collection
40 */
41export function getLoadedIds<T extends { id: string }>(
42 collection: Collection<T>,
43): Array<string> {
44 return Array.from(collection.state.values()).map((item) => item.id)
45}
46
47/**
48 * Get count of loaded items in a collection

Callers 6

assertLoadedExactlyFunction · 0.90
assertLoadedAtLeastFunction · 0.90
assertNotLoadedFunction · 0.90
hasLoadedIdsFunction · 0.85
hasOnlyLoadedIdsFunction · 0.85

Calls 3

fromMethod · 0.80
mapMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…