createCanonicalizeUtilityCache() — tailwindcss Function Reference
Architecture documentation for the createCanonicalizeUtilityCache() function in canonicalize-candidates.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 19c705c9_6183_f093_b0c2_334f2d300052["createCanonicalizeUtilityCache()"] 207ada18_60f2_10b9_7c9e_99bdb32f4ed7["prepareDesignSystemStorage()"] 207ada18_60f2_10b9_7c9e_99bdb32f4ed7 -->|calls| 19c705c9_6183_f093_b0c2_334f2d300052 c98bf5b0_e31e_f92d_3810_96d1e1308d34["parseCandidate()"] 19c705c9_6183_f093_b0c2_334f2d300052 -->|calls| c98bf5b0_e31e_f92d_3810_96d1e1308d34 d36b0f78_79bb_ae15_f4f6_4a1b7f01d29f["cloneCandidate()"] 19c705c9_6183_f093_b0c2_334f2d300052 -->|calls| d36b0f78_79bb_ae15_f4f6_4a1b7f01d29f 4c29981d_a61a_00fb_b3b5_5a69228c4fff["printCandidate()"] 19c705c9_6183_f093_b0c2_334f2d300052 -->|calls| 4c29981d_a61a_00fb_b3b5_5a69228c4fff style 19c705c9_6183_f093_b0c2_334f2d300052 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/canonicalize-candidates.ts lines 535–555
function createCanonicalizeUtilityCache(): DesignSystem['storage'][typeof CANONICALIZE_UTILITY_KEY] {
return new DefaultMap((options: InternalCanonicalizeOptions) => {
let designSystem = options.designSystem
return new DefaultMap((rawCandidate: string): string => {
for (let readonlyCandidate of designSystem.parseCandidate(rawCandidate)) {
let replacement = cloneCandidate(readonlyCandidate) as Writable<typeof readonlyCandidate>
for (let fn of UTILITY_CANONICALIZATIONS) {
replacement = fn(replacement, options)
}
let canonicalizedCandidate = designSystem.printCandidate(replacement)
if (rawCandidate !== canonicalizedCandidate) {
return canonicalizedCandidate
}
}
return rawCandidate
})
})
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does createCanonicalizeUtilityCache() do?
createCanonicalizeUtilityCache() is a function in the tailwindcss codebase.
What does createCanonicalizeUtilityCache() call?
createCanonicalizeUtilityCache() calls 3 function(s): cloneCandidate, parseCandidate, printCandidate.
What calls createCanonicalizeUtilityCache()?
createCanonicalizeUtilityCache() is called by 1 function(s): prepareDesignSystemStorage.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free