Home / Function/ parseParameters() — supabase Function Reference

parseParameters() — supabase Function Reference

Architecture documentation for the parseParameters() function in EditHookPanel.tsx from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  132c691c_bae7_157a_6949_68ba09965d27["parseParameters()"]
  2fd526da_e282_fb5d_bb33_b211accacf07["EditHookPanel()"]
  2fd526da_e282_fb5d_bb33_b211accacf07 -->|calls| 132c691c_bae7_157a_6949_68ba09965d27
  style 132c691c_bae7_157a_6949_68ba09965d27 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/studio/components/interfaces/Database/Hooks/EditHookPanel.tsx lines 63–81

const parseParameters = (selectedHook?: PostgresTrigger): HTTPArgument[] => {
  if (typeof selectedHook === 'undefined') {
    return [{ id: uuidv4(), name: '', value: '' }]
  }
  const [, , , parameters] = selectedHook.function_args
  let parsedParameters: Record<string, string> = {}

  try {
    parsedParameters = JSON.parse(parameters.replace(/\\"/g, '"'))
  } catch (e) {
    parsedParameters = {}
  }

  return Object.entries(parsedParameters).map(([name, value]) => ({
    id: uuidv4(),
    name,
    value,
  }))
}

Subdomains

Called By

Frequently Asked Questions

What does parseParameters() do?
parseParameters() is a function in the supabase codebase.
What calls parseParameters()?
parseParameters() is called by 1 function(s): EditHookPanel.

Analyze Your Own Codebase

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

Try Supermodel Free