Home / Function/ categorizeMethod() — supabase Function Reference

categorizeMethod() — supabase Function Reference

Architecture documentation for the categorizeMethod() function in find-undocumented.ts from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/docs/scripts/find-undocumented.ts lines 38–59

function categorizeMethod(methodPath: string): 'public' | 'constructor' | 'error' | 'internal' {
  const parts = methodPath.split('.')
  const methodName = parts[parts.length - 1]
  const className = parts[parts.length - 2]

  // Internal/private methods start with _
  if (methodName.startsWith('_')) {
    return 'internal'
  }

  // Error class constructors
  if (className?.endsWith('Error') && methodName === 'constructor') {
    return 'error'
  }

  // Other constructors
  if (methodName === 'constructor') {
    return 'constructor'
  }

  return 'public'
}

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free