refactor(lib): remove keys and just get a slug from the label
This commit is contained in:
parent
7dc4bd8a11
commit
456e7e8feb
5 changed files with 26 additions and 30 deletions
3
src/lib/utils/slugify.ts
Normal file
3
src/lib/utils/slugify.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export function slugify(label: string): string {
|
||||
return label.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/(^-|-$)/g, '');
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue