weight() — astro Function Reference
Architecture documentation for the weight() function in dev-font-file-id-generator.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 21e4527b_db7f_c9f4_d2d4_5554949dc08f["weight()"] 768a8024_e2d9_a21c_8496_03d353df56e2["DevFontFileIdGenerator"] 21e4527b_db7f_c9f4_d2d4_5554949dc08f -->|defined in| 768a8024_e2d9_a21c_8496_03d353df56e2 style 21e4527b_db7f_c9f4_d2d4_5554949dc08f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/assets/fonts/infra/dev-font-file-id-generator.ts lines 20–28
#formatWeight(weight: unifont.FontFaceData['weight']): string | undefined {
if (Array.isArray(weight)) {
return weight.join('-');
}
if (typeof weight === 'number') {
return weight.toString();
}
return weight?.replace(/\s+/g, '-');
}
Domain
Subdomains
Source
Frequently Asked Questions
What does weight() do?
weight() is a function in the astro codebase, defined in packages/astro/src/assets/fonts/infra/dev-font-file-id-generator.ts.
Where is weight() defined?
weight() is defined in packages/astro/src/assets/fonts/infra/dev-font-file-id-generator.ts at line 20.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free