MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / searchFunction

Function searchFunction

admin/src/commands/lookup-org.ts:38–47  ·  view source on GitHub ↗
(_answers: unknown, input = '')

Source from the content-addressed store, hash-verified

36 }));
37
38 const searchFunction = async (_answers: unknown, input = '') => {
39 const fuzzyResult = fuzzy.filter(input, searchItems, {
40 extract: (item: OrgSearchItem) => `${item.name} ${item.id}`,
41 });
42
43 return fuzzyResult.map((result: fuzzy.FilterResult<OrgSearchItem>) => ({
44 name: result.original.displayText,
45 value: result.original,
46 }));
47 };
48
49 const { selectedOrg } = (await inquirer.prompt([
50 {

Callers

nothing calls this directly

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected