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

Method #extractLabels

packages/graph/src/Steps.ts:3114–3123  ·  view source on GitHub ↗
(item: unknown, variable: string)

Source from the content-addressed store, hash-verified

3112 }
3113
3114 #extractLabels(item: unknown, variable: string): string[] | undefined {
3115 const value = this.#extractValue(item, variable);
3116 if (value instanceof Vertex) {
3117 return [value.label];
3118 }
3119 if (value instanceof Edge) {
3120 return [value.label];
3121 }
3122 return undefined;
3123 }
3124
3125 #extractProperty(item: unknown, variable: string, property: string): unknown {
3126 const value = this.#extractValue(item, variable);

Callers 2

traverseMethod · 0.95
#computeGroupKeyMethod · 0.95

Calls 1

#extractValueMethod · 0.95

Tested by

no test coverage detected