MCPcopy Create free account
hub / github.com/Noumena-Network/code / jsonParse

Function jsonParse

src/utils/slowOperations.ts:205–212  ·  view source on GitHub ↗
(text, reviver)

Source from the content-addressed store, hash-verified

203 * const data = jsonParse(jsonString)
204 */
205export const jsonParse: typeof JSON.parse = (text, reviver) => {
206 using _ = slowLogging`JSON.parse(${text})`
207 // V8 de-opts JSON.parse when a second argument is passed, even if undefined.
208 // Branch explicitly so the common (no-reviver) path stays on the fast path.
209 return typeof reviver === 'undefined'
210 ? JSON.parse(text)
211 : JSON.parse(text, reviver)
212}
213
214/**
215 * Wrapped structuredClone with slow operation logging.

Callers 15

deserializeLogEntryFunction · 0.85
runFunction · 0.85
renderToolResultMessageFunction · 0.85
callFunction · 0.85
TaskOutputResultDisplayFunction · 0.85
callFunction · 0.85
readJsonFileFunction · 0.85
parseJsonEntriesFunction · 0.85
renderToolResultMessageFunction · 0.85
loadKeybindingsFunction · 0.85
tryFormatJsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected