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