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

Function searchFunction

admin/src/commands/clear-cache.ts:43–52  ·  view source on GitHub ↗
(_answers: unknown, input = '')

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected