MCPcopy Index your code
hub / github.com/liuup/claude-code-analysis / findCommand

Function findCommand

src/commands.ts:688–698  ·  view source on GitHub ↗
(
  commandName: string,
  commands: Command[],
)

Source from the content-addressed store, hash-verified

686}
687
688export function findCommand(
689 commandName: string,
690 commands: Command[],
691): Command | undefined {
692 return commands.find(
693 _ =>
694 _.name === commandName ||
695 getCommandName(_) === commandName ||
696 _.aliases?.includes(commandName),
697 )
698}
699
700export function hasCommand(commandName: string, commands: Command[]): boolean {
701 return findCommand(commandName, commands) !== undefined

Callers 7

hasCommandFunction · 0.85
getCommandFunction · 0.85
validateInputFunction · 0.85
checkPermissionsFunction · 0.85
callFunction · 0.85
processUserInputBaseFunction · 0.85

Calls 1

getCommandNameFunction · 0.50

Tested by

no test coverage detected