MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / isOperator

Function isOperator

src/utils/bash/bashPipeCommand.ts:234–239  ·  view source on GitHub ↗

* Type guard to check if a parsed entry is an operator

(entry: unknown, op?: string)

Source from the content-addressed store, hash-verified

232 * Type guard to check if a parsed entry is an operator
233 */
234function 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.

Callers 2

findFirstPipeOperatorFunction · 0.70
buildCommandPartsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected