( command: ParsedCommandElement, arg: string, )
| 1606 | * Useful for checking "-EncodedCommand", "-Recurse", etc. |
| 1607 | */ |
| 1608 | export function commandHasArg( |
| 1609 | command: ParsedCommandElement, |
| 1610 | arg: string, |
| 1611 | ): boolean { |
| 1612 | const lowerArg = arg.toLowerCase() |
| 1613 | return command.args.some(a => a.toLowerCase() === lowerArg) |
| 1614 | } |
| 1615 | |
| 1616 | /** |
| 1617 | * Tokenizer-level dash characters that PowerShell's parser accepts as |
nothing calls this directly
no outgoing calls
no test coverage detected