i try to use String.normalize("NFD").replace(/[\u0300-\u036f]/g, "") but i have this error in IE11
ERROR TypeError: L’objet ne gère pas la propriété ou la méthode « normalize »
CodePudding user response:
You got the error in IE 11 because IE doesn't support normalize
.
You need to use polyfill to support normalize
in IE 11. You can use module unorm to provide support for normalize
in IE 11.
- Run
npm install unorm
. - Use
import 'unorm';
at the file where you write thenormalize
function.