cloneCandidateSpread() — tailwindcss Function Reference
Architecture documentation for the cloneCandidateSpread() function in candidate.bench.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD e9adff33_b18d_2d1f_f2f3_ce24387caffb["cloneCandidateSpread()"] 16bff9c7_34eb_6bfb_9f80_b116fde86d22["candidate.bench.ts"] e9adff33_b18d_2d1f_f2f3_ce24387caffb -->|defined in| 16bff9c7_34eb_6bfb_9f80_b116fde86d22 style e9adff33_b18d_2d1f_f2f3_ce24387caffb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/candidate.bench.ts lines 48–72
function cloneCandidateSpread(candidate: Candidate): Candidate {
switch (candidate.kind) {
case 'arbitrary':
return {
...candidate,
modifier: candidate.modifier ? { ...candidate.modifier } : null,
variants: candidate.variants.map(cloneVariantSpread),
}
case 'static':
return { ...candidate, variants: candidate.variants.map(cloneVariantSpread) }
case 'functional':
return {
...candidate,
value: candidate.value ? { ...candidate.value } : null,
modifier: candidate.modifier ? { ...candidate.modifier } : null,
variants: candidate.variants.map(cloneVariantSpread),
}
default:
candidate satisfies never
throw new Error('Unknown candidate kind')
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does cloneCandidateSpread() do?
cloneCandidateSpread() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/candidate.bench.ts.
Where is cloneCandidateSpread() defined?
cloneCandidateSpread() is defined in packages/tailwindcss/src/candidate.bench.ts at line 48.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free