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

Method subscribe

packages/y-graph-storage/src/YGraph.ts:273–283  ·  view source on GitHub ↗
(observer: Observer<YGraphChange>)

Source from the content-addressed store, hash-verified

271 }
272
273 public subscribe(observer: Observer<YGraphChange>) {
274 const predicate = this.#predicate;
275 return this.#graph.subscribe({
276 next(value) {
277 const step = predicate(value);
278 if (step != undefined) {
279 observer.next?.(value);
280 }
281 },
282 });
283 }
284
285 public traverse(): Iterable<PathFromTraversal<TTraversal>> {
286 return this.#traversal.traverse();

Callers

nothing calls this directly

Calls 1

subscribeMethod · 0.45

Tested by

no test coverage detected