splitPragma() — react Function Reference
Architecture documentation for the splitPragma() function in TestUtils.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 0a308ef1_088b_bc2c_8901_ab8a0da206f6["splitPragma()"] 61433613_1614_4ece_2f7a_b0186e79adde["TestUtils.ts"] 0a308ef1_088b_bc2c_8901_ab8a0da206f6 -->|defined in| 61433613_1614_4ece_2f7a_b0186e79adde e5e371fb_3742_5a74_1c74_35d7ac870a67["parseConfigPragmaEnvironmentForTest()"] e5e371fb_3742_5a74_1c74_35d7ac870a67 -->|calls| 0a308ef1_088b_bc2c_8901_ab8a0da206f6 7750e61a_286d_376c_20d3_03596b3f28d3["parseConfigPragmaForTests()"] 7750e61a_286d_376c_20d3_03596b3f28d3 -->|calls| 0a308ef1_088b_bc2c_8901_ab8a0da206f6 style 0a308ef1_088b_bc2c_8901_ab8a0da206f6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/Utils/TestUtils.ts lines 98–110
function* splitPragma(
pragma: string,
): Generator<{key: string; value: string | null}> {
for (const entry of pragma.split('@')) {
const keyVal = entry.trim();
const valIdx = keyVal.indexOf(':');
if (valIdx === -1) {
yield {key: keyVal.split(' ', 1)[0], value: null};
} else {
yield {key: keyVal.slice(0, valIdx), value: keyVal.slice(valIdx + 1)};
}
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does splitPragma() do?
splitPragma() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Utils/TestUtils.ts.
Where is splitPragma() defined?
splitPragma() is defined in compiler/packages/babel-plugin-react-compiler/src/Utils/TestUtils.ts at line 98.
What calls splitPragma()?
splitPragma() is called by 2 function(s): parseConfigPragmaEnvironmentForTest, parseConfigPragmaForTests.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free