Home / Function/ fromOrgProjectValue() — supabase Function Reference

fromOrgProjectValue() — supabase Function Reference

Architecture documentation for the fromOrgProjectValue() function in ProjectConfigVariables.utils.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  6a8ac7e0_013c_a41d_d671_f0c0576e1cd9["fromOrgProjectValue()"]
  379c9577_c27e_ab8c_cd03_c220f0827974["OrgProjectSelector()"]
  379c9577_c27e_ab8c_cd03_c220f0827974 -->|calls| 6a8ac7e0_013c_a41d_d671_f0c0576e1cd9
  fe42775f_6af4_6072_bcb8_7ca5df94d5da["unescapeDoubleQuotes()"]
  6a8ac7e0_013c_a41d_d671_f0c0576e1cd9 -->|calls| fe42775f_6af4_6072_bcb8_7ca5df94d5da
  style 6a8ac7e0_013c_a41d_d671_f0c0576e1cd9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.utils.ts lines 58–72

export function fromOrgProjectValue(
  maybeOrgProject: string
): [number, string, string] | [null, null, null] {
  try {
    // not restoring the double quotes on the display name is fine because it's only used for
    // command fuzzy search, not for exact/literal matching
    const data = JSON.parse(unescapeDoubleQuotes(maybeOrgProject))
    if (!Array.isArray(data) || data.length !== 3) {
      throw Error("Shape of parsed JSON doesn't match form of org and project value")
    }
    return data as [number, string, string]
  } catch {
    return [null, null, null]
  }
}

Subdomains

Frequently Asked Questions

What does fromOrgProjectValue() do?
fromOrgProjectValue() is a function in the supabase codebase.
What does fromOrgProjectValue() call?
fromOrgProjectValue() calls 1 function(s): unescapeDoubleQuotes.
What calls fromOrgProjectValue()?
fromOrgProjectValue() is called by 1 function(s): OrgProjectSelector.

Analyze Your Own Codebase

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

Try Supermodel Free