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

Function searchFunction

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

Source from the content-addressed store, hash-verified

60 });
61
62 const searchFunction = async (_answers: unknown, input = '') => {
63 const fuzzyResult = fuzzy.filter(input, searchItems, {
64 extract: (item: UserSearchItem) =>
65 `${item.email} ${item.firstName || ''} ${item.lastName || ''}`,
66 });
67
68 return fuzzyResult.map((result: fuzzy.FilterResult<UserSearchItem>) => ({
69 name: result.original.displayText,
70 value: result.original,
71 }));
72 };
73
74 const { selectedUser } = (await inquirer.prompt([
75 {

Callers

nothing calls this directly

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected