Home / Function/ formatSlug() — supabase Function Reference

formatSlug() — supabase Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  cd915eed_2b90_8197_56f3_a26507b6ce36["formatSlug()"]
  c36f59b9_27d7_5e06_4423_b16e1f0fc20d["SlugComponent()"]
  c36f59b9_27d7_5e06_4423_b16e1f0fc20d -->|calls| cd915eed_2b90_8197_56f3_a26507b6ce36
  27585975_96f1_a469_bb0c_d69231112b6a["formatSlugHook()"]
  27585975_96f1_a469_bb0c_d69231112b6a -->|calls| cd915eed_2b90_8197_56f3_a26507b6ce36
  style cd915eed_2b90_8197_56f3_a26507b6ce36 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/cms/src/fields/slug/formatSlug.ts lines 3–7

export const formatSlug = (val: string): string =>
  val
    .replace(/ /g, '-')
    .replace(/[^\w-]+/g, '')
    .toLowerCase()

Subdomains

Frequently Asked Questions

What does formatSlug() do?
formatSlug() is a function in the supabase codebase.
What calls formatSlug()?
formatSlug() is called by 2 function(s): SlugComponent, formatSlugHook.

Analyze Your Own Codebase

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

Try Supermodel Free