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

Function isOperator

source code/utils/bash/bashPipeCommand.ts:236–241  ·  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

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

Callers 2

findFirstPipeOperatorFunction · 0.70
buildCommandPartsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected