MCPcopy Index your code
hub / github.com/TanStack/devtools / parseWithBigInt

Function parseWithBigInt

packages/event-bus/src/utils/json.ts:21–33  ·  view source on GitHub ↗
(json: string)

Source from the content-addressed store, hash-verified

19 * Objects with __type: 'bigint' are converted back to BigInt
20 */
21export function parseWithBigInt(json: string): any {
22 return JSON.parse(json, (_key, value) => {
23 if (
24 value &&
25 typeof value === 'object' &&
26 value.__type === 'bigint' &&
27 typeof value.value === 'string'
28 ) {
29 return BigInt(value.value)
30 }
31 return value
32 })
33}

Callers 6

constructorMethod · 0.90
handleEventReceivedMethod · 0.90
json.test.tsFile · 0.90
createSSEServerMethod · 0.90
handleNewConnectionMethod · 0.90
startMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected