feat: ajout d'une fonction pour créer les URL
This commit is contained in:
parent
b91cf7d758
commit
2cffd0476a
1 changed files with 8 additions and 0 deletions
8
src/utils/urls.ts
Normal file
8
src/utils/urls.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
export function toURI(str: string): string {
|
||||
return str
|
||||
.toLowerCase()
|
||||
.trim()
|
||||
.replace(/\s+/g, "-")
|
||||
.normalize("NFD")
|
||||
.replace(/[\u0300-\u036f]/g, "");
|
||||
}
|
Loading…
Reference in a new issue