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

Function buildCondition

packages/graph/src/astToSteps.ts:1867–1887  ·  view source on GitHub ↗
(parts: Condition[], type: string)

Source from the content-addressed store, hash-verified

1865 );
1866
1867 const buildCondition = (parts: Condition[], type: string): Condition => {
1868 if (type === "AndCondition") {
1869 return {
1870 type: "AndCondition",
1871 left: parts[0]!,
1872 right: parts[1]!,
1873 } as AndCondition;
1874 } else if (type === "OrCondition") {
1875 return {
1876 type: "OrCondition",
1877 left: parts[0]!,
1878 right: parts[1]!,
1879 } as OrCondition;
1880 } else {
1881 return {
1882 type: "XorCondition",
1883 left: parts[0]!,
1884 right: parts[1]!,
1885 } as XorCondition;
1886 }
1887 };
1888
1889 const early =
1890 earlyParts.length === 0

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected