MCPcopy
hub / github.com/loggerhead/json4u / search

Function search

src/components/ui/search/CommandSearchInput.tsx:18–25  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

16 const displayCommands = commands.filter((c) => !c.hidden);
17
18 const search = (input: string) =>
19 input.trim()
20 ? fuzzysort
21 .go(input, displayCommands, {
22 keys: [(cmd) => cmd.id, (cmd) => t(cmd.id)],
23 })
24 .map((r) => r.obj)
25 : displayCommands;
26
27 return (
28 <SearchInput

Callers 1

SearchInputFunction · 0.70

Calls 1

tFunction · 0.50

Tested by

no test coverage detected