MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / commandHasArg

Function commandHasArg

source code/utils/powershell/parser.ts:1610–1616  ·  view source on GitHub ↗
(
  command: ParsedCommandElement,
  arg: string,
)

Source from the content-addressed store, hash-verified

1608 * Useful for checking "-EncodedCommand", "-Recurse", etc.
1609 */
1610export function commandHasArg(
1611 command: ParsedCommandElement,
1612 arg: string,
1613): boolean {
1614 const lowerArg = arg.toLowerCase()
1615 return command.args.some(a => a.toLowerCase() === lowerArg)
1616}
1617
1618/**
1619 * Tokenizer-level dash characters that PowerShell's parser accepts as

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected