* Type guard to check if a parsed entry is an operator
(entry: unknown, op?: string)
| 232 | * Type guard to check if a parsed entry is an operator |
| 233 | */ |
| 234 | function isOperator(entry: unknown, op?: string): entry is { op: string } { |
| 235 | if (!entry || typeof entry !== 'object' || !('op' in entry)) { |
| 236 | return false |
| 237 | } |
| 238 | return op ? entry.op === op : true |
| 239 | } |
| 240 | |
| 241 | /** |
| 242 | * Checks if a command contains bash control structures that shell-quote cannot parse. |
no outgoing calls
no test coverage detected