MCPcopy Create free account
hub / github.com/codemix/graph / #extractValue

Method #extractValue

packages/graph/src/Steps.ts:4662–4671  ·  view source on GitHub ↗
(pathOrValue: unknown)

Source from the content-addressed store, hash-verified

4660 }
4661
4662 #extractValue(pathOrValue: unknown): unknown {
4663 if (pathOrValue instanceof TraversalPath) {
4664 return pathOrValue.value;
4665 }
4666 if (Array.isArray(pathOrValue)) {
4667 // Handle arrays from SelectStep (nested TraversalPaths)
4668 return pathOrValue.map((v) => this.#extractValue(v));
4669 }
4670 return pathOrValue;
4671 }
4672
4673 #extractProperty(value: unknown, property: string): unknown {
4674 // Property access on null returns null (per Cypher semantics)

Callers 1

traverseMethod · 0.95

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected