newEditLink() — supabase Function Reference
Architecture documentation for the newEditLink() function in helpers.edit-link.tsx from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 7f613770_e64b_8d47_0723_7692dd6947af["newEditLink()"] ab4f49e3_ca6f_6ee7_e6ce_c61c06858edc["getContent()"] ab4f49e3_ca6f_6ee7_e6ce_c61c06858edc -->|calls| 7f613770_e64b_8d47_0723_7692dd6947af style 7f613770_e64b_8d47_0723_7692dd6947af fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/features/helpers.edit-link.tsx lines 16–36
const newEditLink = (str: string): EditLink => {
if (str.startsWith('/')) {
throw Error(`Edit links cannot start with slashes. Received: ${str}`)
}
/**
* Catch strings that provide FQDNS without https?:
*
* At the start of a string, before the first slash, there is a dot
* surrounded by non-slash characters.
*/
if (/^[^\/]+\.[^\/]+\//.test(str)) {
throw Error(`Fully qualified domain names must start with 'https?'. Received: ${str}`)
}
return {
[EDIT_LINK_SYMBOL]: true,
link: str,
includesProtocol: str.startsWith('http://') || str.startsWith('https://'),
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does newEditLink() do?
newEditLink() is a function in the supabase codebase.
What calls newEditLink()?
newEditLink() is called by 1 function(s): getContent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free