MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / hasStep

Function hasStep

ui/src/lib/program-model.ts:230–240  ·  view source on GitHub ↗

Whether anything in this block draws a box — a fork with one drawn arm is a guard clause, not a point.

(block: WireBlock)

Source from the content-addressed store, hash-verified

228
229/** Whether anything in this block draws a box — a fork with one drawn arm is a guard clause, not a point. */
230function hasStep(block: WireBlock): boolean {
231 return block.some((item) =>
232 item.kind === 'step'
233 ? true
234 : item.kind === 'fork'
235 ? item.arms.some((a) => hasStep(a.body))
236 : item.kind === 'block'
237 ? hasStep(item.body)
238 : false
239 );
240}
241
242/** The word on a line out of a decision's point — the same one the tree's arms say. */
243function armWord(fork: Extract<WireItem, { kind: 'fork' }>, arm: WireArm): string {

Callers 1

flowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected