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

Function searchFunction

admin/src/commands/delete-organization.ts:54–63  ·  view source on GitHub ↗
(_answers: unknown, input = '')

Source from the content-addressed store, hash-verified

52 }));
53
54 const searchFunction = async (_answers: unknown, input = '') => {
55 const fuzzyResult = fuzzy.filter(input, searchItems, {
56 extract: (item: OrgSearchItem) => `${item.name} ${item.id}`,
57 });
58
59 return fuzzyResult.map((result: fuzzy.FilterResult<OrgSearchItem>) => ({
60 name: result.original.displayText,
61 value: result.original,
62 }));
63 };
64
65 const { selectedOrg } = (await inquirer.prompt([
66 {

Callers

nothing calls this directly

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected