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

Function getStateEntries

packages/db/tests/collection.test.ts:34–43  ·  view source on GitHub ↗
(collection: {
  state: Map<TKey, T>
})

Source from the content-addressed store, hash-verified

32) => stripVirtualProps(collection.state.get(key))
33
34const getStateEntries = <
35 T extends object,
36 TKey extends string | number,
37>(collection: {
38 state: Map<TKey, T>
39}) =>
40 Array.from(collection.state.entries()).map(([key, value]) => [
41 key,
42 stripVirtualProps(value),
43 ])
44
45describe(`Collection`, () => {
46 it(`should throw if there's no sync config`, () => {

Callers 2

collection.test.tsFile · 0.85
mutationFnFunction · 0.85

Calls 4

stripVirtualPropsFunction · 0.90
fromMethod · 0.80
mapMethod · 0.45
entriesMethod · 0.45

Tested by

no test coverage detected