defaultSort() — tailwindcss Function Reference
Architecture documentation for the defaultSort() function in sort.test.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 23c240e0_63ec_1bbb_5bde_2a5314e67e42["defaultSort()"] 35c3c06c_16c4_cf74_8db0_ff582227714d["sort.test.ts"] 23c240e0_63ec_1bbb_5bde_2a5314e67e42 -->|defined in| 35c3c06c_16c4_cf74_8db0_ff582227714d 8bc095b8_a30a_d001_4656_75d4b88436d9["sortClasses()"] 8bc095b8_a30a_d001_4656_75d4b88436d9 -->|calls| 23c240e0_63ec_1bbb_5bde_2a5314e67e42 25dcd5d8_7a4b_4c72_248b_963c19bd52c0["bigSign()"] 23c240e0_63ec_1bbb_5bde_2a5314e67e42 -->|calls| 25dcd5d8_7a4b_4c72_248b_963c19bd52c0 style 23c240e0_63ec_1bbb_5bde_2a5314e67e42 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/sort.test.ts lines 100–110
function defaultSort(arrayOfTuples: [string, bigint | null][]): string {
return arrayOfTuples
.sort(([, a], [, z]) => {
if (a === z) return 0
if (a === null) return -1
if (z === null) return 1
return bigSign(a - z)
})
.map(([className]) => className)
.join(' ')
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does defaultSort() do?
defaultSort() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/sort.test.ts.
Where is defaultSort() defined?
defaultSort() is defined in packages/tailwindcss/src/sort.test.ts at line 100.
What does defaultSort() call?
defaultSort() calls 1 function(s): bigSign.
What calls defaultSort()?
defaultSort() is called by 1 function(s): sortClasses.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free