Home / Function/ modify() — supabase Function Reference

modify() — supabase Function Reference

Architecture documentation for the modify() function in rehypeLinkTransform.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  e363e39f_975a_97ad_2570_b817c13ec590["modify()"]
  5c2c3460_cac1_3001_e37c_a595f4a6aec7["linkTransform()"]
  5c2c3460_cac1_3001_e37c_a595f4a6aec7 -->|calls| e363e39f_975a_97ad_2570_b817c13ec590
  style e363e39f_975a_97ad_2570_b817c13ec590 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/lib/mdx/plugins/rehypeLinkTransform.ts lines 8–17

function modify(node: Element, prop: string, fn?: UrlTransformFunction) {
  if (node.properties && hasProperty(node, prop)) {
    const property = node.properties[prop]
    if (typeof property !== 'string') {
      return
    }

    node.properties[prop] = fn?.(property, node) ?? property
  }
}

Subdomains

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free