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

Function searchFunction

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected