MCPcopy Create free account
hub / github.com/codemix/graph / traverse

Method traverse

packages/graph/src/Steps.ts:4537–4554  ·  view source on GitHub ↗
(
    source: GraphSource<any>,
    input: Iterable<unknown>,
    _context?: QueryContext,
  )

Source from the content-addressed store, hash-verified

4535 }
4536
4537 public *traverse(
4538 source: GraphSource<any>,
4539 input: Iterable<unknown>,
4540 _context?: QueryContext,
4541 ): IterableIterator<unknown> {
4542 for (const value of input) {
4543 this.traversed++;
4544 if (Array.isArray(value)) {
4545 for (const element of value) {
4546 this.emitted++;
4547 yield element;
4548 }
4549 } else {
4550 this.emitted++;
4551 yield value;
4552 }
4553 }
4554 }
4555
4556 public override clone(partial?: Partial<UnfoldStepConfig>) {
4557 return new UnfoldStep({

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected