extractRawCandidates() — tailwindcss Function Reference
Architecture documentation for the extractRawCandidates() function in candidates.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 8b1ca68c_6690_d65e_cc71_429e9efe9dc5["extractRawCandidates()"] 530db924_e458_e8b2_fde4_45f3e78b4424["candidates.ts"] 8b1ca68c_6690_d65e_cc71_429e9efe9dc5 -->|defined in| 530db924_e458_e8b2_fde4_45f3e78b4424 f18844e7_09bc_0235_ac39_82d8fe0af50c["migrateContents()"] f18844e7_09bc_0235_ac39_82d8fe0af50c -->|calls| 8b1ca68c_6690_d65e_cc71_429e9efe9dc5 style 8b1ca68c_6690_d65e_cc71_429e9efe9dc5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/@tailwindcss-upgrade/src/codemods/template/candidates.ts lines 5–17
export async function extractRawCandidates(
content: string,
extension: string = 'html',
): Promise<{ rawCandidate: string; start: number; end: number }[]> {
let scanner = new Scanner({})
let result = scanner.getCandidatesWithPositions({ content, extension })
let candidates: { rawCandidate: string; start: number; end: number }[] = []
for (let { candidate: rawCandidate, position: start } of result) {
candidates.push({ rawCandidate, start, end: start + rawCandidate.length })
}
return candidates
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does extractRawCandidates() do?
extractRawCandidates() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/codemods/template/candidates.ts.
Where is extractRawCandidates() defined?
extractRawCandidates() is defined in packages/@tailwindcss-upgrade/src/codemods/template/candidates.ts at line 5.
What calls extractRawCandidates()?
extractRawCandidates() is called by 1 function(s): migrateContents.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free