Home / Function/ isUrl() — ui Function Reference

isUrl() — ui Function Reference

Architecture documentation for the isUrl() function in utils.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  ef860c53_bcca_c729_b5d1_a490f284253c["isUrl()"]
  edc2979a_e040_ab0c_5174_c69f7c8fa905["utils.ts"]
  ef860c53_bcca_c729_b5d1_a490f284253c -->|defined in| edc2979a_e040_ab0c_5174_c69f7c8fa905
  fe7f4163_7b5c_8e6e_fb28_4db1891f64b4["isLocalFile()"]
  fe7f4163_7b5c_8e6e_fb28_4db1891f64b4 -->|calls| ef860c53_bcca_c729_b5d1_a490f284253c
  style ef860c53_bcca_c729_b5d1_a490f284253c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/shadcn/src/registry/utils.ts lines 255–262

export function isUrl(path: string) {
  try {
    new URL(path)
    return true
  } catch (error) {
    return false
  }
}

Subdomains

Called By

Frequently Asked Questions

What does isUrl() do?
isUrl() is a function in the ui codebase, defined in packages/shadcn/src/registry/utils.ts.
Where is isUrl() defined?
isUrl() is defined in packages/shadcn/src/registry/utils.ts at line 255.
What calls isUrl()?
isUrl() is called by 1 function(s): isLocalFile.

Analyze Your Own Codebase

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

Try Supermodel Free