( command: ParsedCommandElement, arg: string, )
| 1608 | * Useful for checking "-EncodedCommand", "-Recurse", etc. |
| 1609 | */ |
| 1610 | export 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 |
nothing calls this directly
no outgoing calls
no test coverage detected