findNode() — tailwindcss Function Reference
Architecture documentation for the findNode() function in ast.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 259dde3d_da3e_b1d0_30ff_85ba2a6327f2["findNode()"] b9cbffa4_c352_cf3c_268f_cbb174fb3a47["ast.ts"] 259dde3d_da3e_b1d0_30ff_85ba2a6327f2 -->|defined in| b9cbffa4_c352_cf3c_268f_cbb174fb3a47 9f2a64dc_05ff_3425_1af8_f2dbd33c3b9a["optimizeAst()"] 9f2a64dc_05ff_3425_1af8_f2dbd33c3b9a -->|calls| 259dde3d_da3e_b1d0_30ff_85ba2a6327f2 4982d9ce_98d4_85d9_44af_7cc47b93c482["walk()"] 259dde3d_da3e_b1d0_30ff_85ba2a6327f2 -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482 style 259dde3d_da3e_b1d0_30ff_85ba2a6327f2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/ast.ts lines 889–899
function findNode(ast: AstNode[], fn: (node: AstNode) => boolean): AstNode[] | null {
let foundPath: AstNode[] = []
walk(ast, (node, ctx) => {
if (fn(node)) {
foundPath = ctx.path()
foundPath.push(node)
return WalkAction.Stop
}
})
return foundPath
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does findNode() do?
findNode() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/ast.ts.
Where is findNode() defined?
findNode() is defined in packages/tailwindcss/src/ast.ts at line 889.
What does findNode() call?
findNode() calls 1 function(s): walk.
What calls findNode()?
findNode() is called by 1 function(s): optimizeAst.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free