findNode() — tailwindcss Function Reference
Architecture documentation for the findNode() function in ast.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 5daefc59_7deb_2ccc_ec71_c41b8211de08["findNode()"] 42640952_ea63_55f1_1ff1_00816e2980ae["ast.ts"] 5daefc59_7deb_2ccc_ec71_c41b8211de08 -->|defined in| 42640952_ea63_55f1_1ff1_00816e2980ae 47b4c875_7e44_6ff9_fb06_16ecf9254223["optimizeAst()"] 47b4c875_7e44_6ff9_fb06_16ecf9254223 -->|calls| 5daefc59_7deb_2ccc_ec71_c41b8211de08 ed78da58_8727_ad98_120c_61f35cea357a["walk()"] 5daefc59_7deb_2ccc_ec71_c41b8211de08 -->|calls| ed78da58_8727_ad98_120c_61f35cea357a style 5daefc59_7deb_2ccc_ec71_c41b8211de08 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