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

Function isSingleCommand

source code/utils/powershell/parser.ts:1596–1604  ·  view source on GitHub ↗
(parsed: ParsedPowerShellCommand)

Source from the content-addressed store, hash-verified

1594 */
1595// exported for testing
1596export function isSingleCommand(parsed: ParsedPowerShellCommand): boolean {
1597 const stmt = parsed.statements[0]
1598 return (
1599 parsed.statements.length === 1 &&
1600 stmt !== undefined &&
1601 stmt.commands.length === 1 &&
1602 (!stmt.nestedCommands || stmt.nestedCommands.length === 0)
1603 )
1604}
1605
1606/**
1607 * Check if a specific command has a given argument/flag (case-insensitive).

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected