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

Method nodes

packages/graph/src/Traversals.ts:149–158  ·  view source on GitHub ↗
(propertyName?: string)

Source from the content-addressed store, hash-verified

147 propertyName: TPropertyName,
148 ): GetTraversalPathVertexPropertyValues<TraversalPath<TParent, TValue, TLabels>, TPropertyName>;
149 public nodes(propertyName?: string) {
150 const nodes: unknown[] = [];
151 for (const step of this) {
152 if (!(step.value instanceof Vertex)) {
153 continue;
154 }
155 nodes.push(propertyName ? step.property(propertyName as never) : step.value);
156 }
157 return nodes;
158 }
159
160 /**
161 * Return the edges/relationships in this path, in traversal order.

Callers 1

Calls 2

pushMethod · 0.45
propertyMethod · 0.45

Tested by

no test coverage detected