findNode() — tailwindcss Function Reference
Architecture documentation for the findNode() function in ast.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 542f9fd7_747b_195e_e9c9_5ecb41125f1b["findNode()"] ec867cf3_916b_0d16_65ec_c715e69fee03["optimizeAst()"] ec867cf3_916b_0d16_65ec_c715e69fee03 -->|calls| 542f9fd7_747b_195e_e9c9_5ecb41125f1b e9d556bc_f22d_356c_1bd2_27442c34b5c7["walk()"] 542f9fd7_747b_195e_e9c9_5ecb41125f1b -->|calls| e9d556bc_f22d_356c_1bd2_27442c34b5c7 style 542f9fd7_747b_195e_e9c9_5ecb41125f1b 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
Calls
Called By
Source
Frequently Asked Questions
What does findNode() do?
findNode() is a function in the tailwindcss codebase.
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