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

Method traverse

packages/graph/src/Steps.ts:2891–2904  ·  view source on GitHub ↗
(
    _source: GraphSource<any>,
    input: Iterable<TInput>,
    _context?: QueryContext,
  )

Source from the content-addressed store, hash-verified

2889 }
2890
2891 public *traverse(
2892 _source: GraphSource<any>,
2893 input: Iterable<TInput>,
2894 _context?: QueryContext,
2895 ): IterableIterator<unknown> {
2896 const { predicate } = this.config;
2897 for (const value of input) {
2898 this.traversed++;
2899 if (predicate(value as TInput)) {
2900 this.emitted++;
2901 yield value;
2902 }
2903 }
2904 }
2905
2906 public override clone(partial?: Partial<FilterPredicateStepConfig<TInput>>) {
2907 const { config } = this;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected