| 123456789101112131415161718 |
- /**
- * Remove any special characters from the string
- *
- * @param s
- */
- function normalize(s: string): string {
- return s
- .toLowerCase()
- .replace(/[éèẽëê]/g, 'e')
- .replace(/[ç]/g, 'c')
- .replace(/[îïĩ]/g, 'i')
- .replace(/[àã]/g, 'a')
- .replace(/[öôõ]/g, 'o')
- .replace(/[ûüũ]/g, 'u')
- .replace(/[-]/g, ' ')
- .trim()
- }
|