fileExtension() — astro Function Reference
Architecture documentation for the fileExtension() function in path.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD e6e4f746_2845_6c44_ca86_66db4f2f51f2["fileExtension()"] f5377c99_3ce3_1abd_148f_93394ff5efe2["path.ts"] e6e4f746_2845_6c44_ca86_66db4f2f51f2 -->|defined in| f5377c99_3ce3_1abd_148f_93394ff5efe2 style e6e4f746_2845_6c44_ca86_66db4f2f51f2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/internal-helpers/src/path.ts lines 229–232
export function fileExtension(path: string) {
const ext = path.split('.').pop();
return ext !== path ? `.${ext}` : '';
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does fileExtension() do?
fileExtension() is a function in the astro codebase, defined in packages/internal-helpers/src/path.ts.
Where is fileExtension() defined?
fileExtension() is defined in packages/internal-helpers/src/path.ts at line 229.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free