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

Function isPowerShellParameter

source code/utils/powershell/parser.ts:1649–1657  ·  view source on GitHub ↗
(
  arg: string,
  elementType?: CommandElementType,
)

Source from the content-addressed store, hash-verified

1647 * to a char check against PS_TOKENIZER_DASH_CHARS.
1648 */
1649export function isPowerShellParameter(
1650 arg: string,
1651 elementType?: CommandElementType,
1652): boolean {
1653 if (elementType !== undefined) {
1654 return elementType === 'Parameter'
1655 }
1656 return arg.length > 0 && PS_TOKENIZER_DASH_CHARS.has(arg[0]!)
1657}
1658
1659/**
1660 * Check if any argument on a command is an unambiguous abbreviation of a PowerShell parameter.

Callers 2

isAllowlistedCommandFunction · 0.85
extractPathsFromCommandFunction · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected