Home / Function/ isValidName() — astro Function Reference

isValidName() — astro Function Reference

Architecture documentation for the isValidName() function in shared.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  686845eb_122f_03c7_e7ef_24cf750783f8["isValidName()"]
  a889965c_1012_004b_402e_d9c7a19cb67b["shared.ts"]
  686845eb_122f_03c7_e7ef_24cf750783f8 -->|defined in| a889965c_1012_004b_402e_d9c7a19cb67b
  b10b4f33_88d4_af5f_1adb_bff81cc55d1e["toValidName()"]
  b10b4f33_88d4_af5f_1adb_bff81cc55d1e -->|calls| 686845eb_122f_03c7_e7ef_24cf750783f8
  style 686845eb_122f_03c7_e7ef_24cf750783f8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/create-astro/src/actions/shared.ts lines 44–46

function isValidName(projectName: string) {
	return /^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(projectName);
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does isValidName() do?
isValidName() is a function in the astro codebase, defined in packages/create-astro/src/actions/shared.ts.
Where is isValidName() defined?
isValidName() is defined in packages/create-astro/src/actions/shared.ts at line 44.
What calls isValidName()?
isValidName() is called by 1 function(s): toValidName.

Analyze Your Own Codebase

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

Try Supermodel Free