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

Function getSortedMatchersForEvent

src/utils/hooks/hooksConfigManager.ts:369–378  ·  view source on GitHub ↗
(
  hooksByEventAndMatcher: Record<
    HookEvent,
    Record<string, IndividualHookConfig[]>
  >,
  event: HookEvent,
)

Source from the content-addressed store, hash-verified

367
368// Get sorted matchers for a specific event
369export function getSortedMatchersForEvent(
370 hooksByEventAndMatcher: Record<
371 HookEvent,
372 Record<string, IndividualHookConfig[]>
373 >,
374 event: HookEvent,
375): string[] {
376 const matchers = Object.keys(hooksByEventAndMatcher[event] || {})
377 return sortMatchersByPriority(matchers, hooksByEventAndMatcher, event)
378}
379
380// Get hooks for a specific event and matcher
381export function getHooksForMatcher(

Callers 1

HooksConfigMenuFunction · 0.85

Calls 2

sortMatchersByPriorityFunction · 0.85
keysMethod · 0.80

Tested by

no test coverage detected