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

Function getAll

examples/react/offline-transactions/src/utils/todos.ts:28–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26
27export const todoService = {
28 getAll(): Array<Todo> {
29 return Array.from(todosStore.values()).sort(
30 (a, b) =>
31 new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),
32 )
33 },
34
35 getById(id: string): Todo | undefined {
36 return todosStore.get(id)

Callers

nothing calls this directly

Calls 2

fromMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected