coerceGateConditionToFunction() — react Function Reference
Architecture documentation for the coerceGateConditionToFunction() function in setupTests.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 662f4f24_0157_d9f2_ab91_0d88a2063ab2["coerceGateConditionToFunction()"] 01d850dc_3214_54c0_e858_c1194dd15ff0["setupTests.js"] 662f4f24_0157_d9f2_ab91_0d88a2063ab2 -->|defined in| 01d850dc_3214_54c0_e858_c1194dd15ff0 909084f5_b0b3_1893_708d_ff31a1d296c3["global()"] 909084f5_b0b3_1893_708d_ff31a1d296c3 -->|calls| 662f4f24_0157_d9f2_ab91_0d88a2063ab2 style 662f4f24_0157_d9f2_ab91_0d88a2063ab2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/jest/setupTests.js lines 230–236
const coerceGateConditionToFunction = gateFnOrString => {
return typeof gateFnOrString === 'string'
? // `gate('foo')` is treated as equivalent to `gate(flags => flags.foo)`
flags => flags[gateFnOrString]
: // Assume this is already a function
gateFnOrString;
};
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does coerceGateConditionToFunction() do?
coerceGateConditionToFunction() is a function in the react codebase, defined in scripts/jest/setupTests.js.
Where is coerceGateConditionToFunction() defined?
coerceGateConditionToFunction() is defined in scripts/jest/setupTests.js at line 230.
What calls coerceGateConditionToFunction()?
coerceGateConditionToFunction() is called by 1 function(s): global.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free