MCPcopy Create free account
hub / github.com/apache/fory / resolveCompatibleModes

Function resolveCompatibleModes

integration_tests/idl_tests/javascript/roundtrip.ts:97–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95type AssertFn<T> = (expected: T, actual: unknown) => void;
96
97function resolveCompatibleModes(): boolean[] {
98 const value = process.env.IDL_COMPATIBLE;
99 if (value == null || value.trim() === "") {
100 return [false, true];
101 }
102 const normalized = value.trim().toLowerCase();
103 if (normalized === "1" || normalized === "true" || normalized === "yes") {
104 return [true];
105 }
106 if (normalized === "0" || normalized === "false" || normalized === "no") {
107 return [false];
108 }
109 throw new Error(`Unsupported IDL_COMPATIBLE value: ${value}`);
110}
111
112function buildFory(
113 compatible: boolean,

Callers 1

roundtrip.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected