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

Function serializeValue

packages/db-ivm/src/utils.ts:201–211  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

199 * This is used for creating string keys in groupBy operations.
200 */
201export function serializeValue(value: unknown): string {
202 return JSON.stringify(value, (_, val) => {
203 if (typeof val === 'bigint') {
204 return val.toString()
205 }
206 if (val instanceof Date) {
207 return val.toISOString()
208 }
209 return val
210 })
211}

Callers 6

processGroupByFunction · 0.90
computeOrderedLoadCursorFunction · 0.90
handleInsertMethod · 0.50
handleUpdateMethod · 0.50
groupByFunction · 0.50

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected