Humanizes a scope value for display in UI. Converts machine-readable scope names to human-friendly labels.
Optional
The raw scope value (e.g., "matching-page", "context-aware").
Human-friendly label (e.g., "Matching Page", "Context-Aware").
export function humanizeScope(scope?: string): string { if (!scope || scope === "global") { return "Global"; } return scope .split("-") .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) .join(" ");} Copy
export function humanizeScope(scope?: string): string { if (!scope || scope === "global") { return "Global"; } return scope .split("-") .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) .join(" ");}
Humanizes a scope value for display in UI. Converts machine-readable scope names to human-friendly labels.