Home / File/ getAssetsPrefix.ts — astro Source File

getAssetsPrefix.ts — astro Source File

Architecture documentation for getAssetsPrefix.ts, a typescript file in the astro codebase. 1 imports, 0 dependents.

File typescript CoreAstro RenderingEngine 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  75a0488a_a4e7_e4cc_d061_18d5775d4a22["getAssetsPrefix.ts"]
  a4f2698c_5256_262a_ba7c_f72b51878d10["../core/app/types.js"]
  75a0488a_a4e7_e4cc_d061_18d5775d4a22 --> a4f2698c_5256_262a_ba7c_f72b51878d10
  style 75a0488a_a4e7_e4cc_d061_18d5775d4a22 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { AssetsPrefix } from '../../core/app/types.js';

export function getAssetsPrefix(fileExtension: string, assetsPrefix?: AssetsPrefix): string {
	let prefix = '';
	if (!assetsPrefix) {
		prefix = '';
	} else if (typeof assetsPrefix === 'string') {
		prefix = assetsPrefix;
	} else {
		// we assume the file extension has a leading '.' and we remove it
		const dotLessFileExtension = fileExtension.slice(1);
		prefix = assetsPrefix[dotLessFileExtension] || assetsPrefix.fallback;
	}

	return prefix;
}

Domain

Subdomains

Functions

Dependencies

  • ../core/app/types.js

Frequently Asked Questions

What does getAssetsPrefix.ts do?
getAssetsPrefix.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RenderingEngine subdomain.
What functions are defined in getAssetsPrefix.ts?
getAssetsPrefix.ts defines 1 function(s): getAssetsPrefix.
What does getAssetsPrefix.ts depend on?
getAssetsPrefix.ts imports 1 module(s): ../core/app/types.js.
Where is getAssetsPrefix.ts in the architecture?
getAssetsPrefix.ts is located at packages/astro/src/assets/utils/getAssetsPrefix.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/assets/utils).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free