MCPcopy
hub / github.com/codeaashu/claude-code / findCommand

Function findCommand

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

Source from the content-addressed store, hash-verified

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