MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getJsonInput

Function getJsonInput

src/utils/hooks.ts:2128–2140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2126 | { ok: false; error: unknown }
2127 | undefined
2128 function getJsonInput() {
2129 if (jsonInputResult !== undefined) {
2130 return jsonInputResult
2131 }
2132 try {
2133 return (jsonInputResult = { ok: true, value: jsonStringify(hookInput) })
2134 } catch (error) {
2135 logError(
2136 Error(`Failed to stringify hook ${hookName} input`, { cause: error }),
2137 )
2138 return (jsonInputResult = { ok: false, error })
2139 }
2140 }
2141
2142 // Run all hooks in parallel with individual timeouts
2143 const hookPromises = matchingHooks.map(async function* (

Callers 1

executeHooksFunction · 0.85

Calls 2

jsonStringifyFunction · 0.85
logErrorFunction · 0.70

Tested by

no test coverage detected