MCPcopy
hub / github.com/codeaashu/claude-code / registerHookEventHandler

Function registerHookEventHandler

src/utils/hooks/hookEvents.ts:61–70  ·  view source on GitHub ↗
(
  handler: HookEventHandler | null,
)

Source from the content-addressed store, hash-verified

59let allHookEventsEnabled = false
60
61export function registerHookEventHandler(
62 handler: HookEventHandler | null,
63): void {
64 eventHandler = handler
65 if (handler && pendingEvents.length > 0) {
66 for (const event of pendingEvents.splice(0)) {
67 handler(event)
68 }
69 }
70}
71
72function emit(event: HookExecutionEvent): void {
73 if (eventHandler) {

Callers 1

runHeadlessFunction · 0.85

Calls 2

spliceMethod · 0.80
handlerFunction · 0.50

Tested by

no test coverage detected