MCPcopy
hub / github.com/cursor/community-plugins / resolveComponentSlug

Function resolveComponentSlug

apps/cursor/src/lib/slug.ts:36–44  ·  view source on GitHub ↗
(comp: {
  slug?: string | null;
  name: string;
})

Source from the content-addressed store, hash-verified

34 * constraint and rescan-diff keys match the value stored on the row.
35 */
36export function resolveComponentSlug(comp: {
37 slug?: string | null;
38 name: string;
39}): string {
40 if (comp.slug) {
41 return comp.slug.slice(0, MAX_SLUG_LENGTH).replace(/-+$/g, "");
42 }
43 return slugify(comp.name);
44}

Callers 5

fingerprintComponentFunction · 0.90
resolveComponentMetadataFunction · 0.90
installRelevantChangedFunction · 0.90
update-plugin.tsFile · 0.90
insertPluginFunction · 0.90

Calls 1

slugifyFunction · 0.85

Tested by

no test coverage detected