intersection() — tailwindcss Function Reference
Architecture documentation for the intersection() function in canonicalize-candidates.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 70636fc3_eb40_39dc_a728_9f5b388db833["intersection()"] f6c14bbb_2e42_58cc_18f1_c89a243da9c0["canonicalize-candidates.ts"] 70636fc3_eb40_39dc_a728_9f5b388db833 -->|defined in| f6c14bbb_2e42_58cc_18f1_c89a243da9c0 fd4a6387_6427_eb54_6f14_abd89a3baf61["collapseCandidates()"] fd4a6387_6427_eb54_6f14_abd89a3baf61 -->|calls| 70636fc3_eb40_39dc_a728_9f5b388db833 style 70636fc3_eb40_39dc_a728_9f5b388db833 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/canonicalize-candidates.ts lines 2602–2617
function intersection<T>(a: Set<T>, b: Set<T>): Set<T> {
// @ts-expect-error Set.prototype.intersection is only available in Node.js v22+
if (typeof a.intersection === 'function') return a.intersection(b)
// Polyfill for environments that do not support Set.prototype.intersection yet
if (a.size === 0 || b.size === 0) return new Set<T>()
let result = new Set<T>(a)
for (let item of b) {
if (!result.has(item)) {
result.delete(item)
}
}
return result
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does intersection() do?
intersection() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/canonicalize-candidates.ts.
Where is intersection() defined?
intersection() is defined in packages/tailwindcss/src/canonicalize-candidates.ts at line 2602.
What calls intersection()?
intersection() is called by 1 function(s): collapseCandidates.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free