MCPcopy Create free account
hub / github.com/6174/comflowyspace / getValueTypeOfNodeSlot

Function getValueTypeOfNodeSlot

packages/common/utils/workflow.ts:7–21  ·  view source on GitHub ↗
(node: SDNode, handleId: string, handleType: string)

Source from the content-addressed store, hash-verified

5 * return slot value type of a normal node
6 */
7export function getValueTypeOfNodeSlot(node: SDNode, handleId: string, handleType: string): string {
8 let valueType = "";
9 if (handleType === "source") {
10 const output = node.outputs.find(output => output.name.toUpperCase() === handleId);
11 if (output) {
12 valueType = output.type;
13 }
14 } else {
15 const input = node.inputs.find(input => input.name.toUpperCase() === handleId);
16 if (input) {
17 valueType = input.type;
18 }
19 }
20 return valueType;
21}
22
23export function getNodePositionInGroup(node: Node, containerNode: Node) {
24 const nodePosition = node.positionAbsolute ?? node.position ?? { x: 0, y: 0 };

Callers 1

getValueTypeOfNodeSlotFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected