Home / Function/ finderFn() — ui Function Reference

finderFn() — ui Function Reference

Architecture documentation for the finderFn() function in use-search-registry.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  8a36dbc6_a578_f3f4_fe9f_b25585b29029["finderFn()"]
  d1366928_803e_21f1_c52e_dc3a4d4c6a37["use-search-registry.ts"]
  8a36dbc6_a578_f3f4_fe9f_b25585b29029 -->|defined in| d1366928_803e_21f1_c52e_dc3a4d4c6a37
  66c3ef14_d1ac_86ea_d754_1e76c153a7d8["searchDirectory()"]
  66c3ef14_d1ac_86ea_d754_1e76c153a7d8 -->|calls| 8a36dbc6_a578_f3f4_fe9f_b25585b29029
  076e8596_27a0_335d_0472_07b50a5f7df7["normalizeQuery()"]
  8a36dbc6_a578_f3f4_fe9f_b25585b29029 -->|calls| 076e8596_27a0_335d_0472_07b50a5f7df7
  style 8a36dbc6_a578_f3f4_fe9f_b25585b29029 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/hooks/use-search-registry.ts lines 8–20

function finderFn<T extends (typeof globalRegistries)[0]>(
  registry: T,
  query: string
) {
  const normalizedName = normalizeQuery(registry.name)
  const normalizedDecription = normalizeQuery(registry.description)
  const normalizedQuery = normalizeQuery(query)

  return (
    normalizedName.includes(normalizedQuery) ||
    normalizedDecription.includes(normalizedQuery)
  )
}

Subdomains

Called By

Frequently Asked Questions

What does finderFn() do?
finderFn() is a function in the ui codebase, defined in apps/v4/hooks/use-search-registry.ts.
Where is finderFn() defined?
finderFn() is defined in apps/v4/hooks/use-search-registry.ts at line 8.
What does finderFn() call?
finderFn() calls 1 function(s): normalizeQuery.
What calls finderFn()?
finderFn() is called by 1 function(s): searchDirectory.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free