(comp: {
slug?: string | null;
name: string;
})
| 34 | * constraint and rescan-diff keys match the value stored on the row. |
| 35 | */ |
| 36 | export 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 | } |
no test coverage detected