(value: string)
| 19 | * rather than turned into separators. |
| 20 | */ |
| 21 | export function slugify(value: string): string { |
| 22 | return value |
| 23 | .toLowerCase() |
| 24 | .replace(/['".]/g, "") |
| 25 | .replace(/[^a-z0-9]+/g, "-") |
| 26 | .replace(/^-+|-+$/g, "") |
| 27 | .slice(0, MAX_SLUG_LENGTH) |
| 28 | .replace(/-+$/g, ""); |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Resolve a component's effective slug: an explicit slug if provided, else one |
no outgoing calls
no test coverage detected