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

Function stripVirtualPropsDeep

packages/db/tests/query/union-all.test.ts:182–195  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

180}
181
182function stripVirtualPropsDeep(value: unknown): any {
183 if (Array.isArray(value)) {
184 return value.map((entry) => stripVirtualPropsDeep(entry))
185 }
186 if (value && typeof value === `object`) {
187 const out: Record<string, unknown> = {}
188 const stripped = stripVirtualProps(value as Record<string, unknown>)
189 for (const [key, entry] of Object.entries(stripped)) {
190 out[key] = stripVirtualPropsDeep(entry)
191 }
192 return out
193 }
194 return value
195}
196
197function childRows(collection: {
198 toArray: ReadonlyArray<unknown>

Callers 2

childRowsFunction · 0.70
union-all.test.tsFile · 0.70

Calls 3

stripVirtualPropsFunction · 0.50
mapMethod · 0.45
entriesMethod · 0.45

Tested by

no test coverage detected