namor.
Jun 6, 2024

Remove accent from string in JavaScript

const removeAccent = (text: string) => text.normalize("NFD").replace(/[\u0300-\u036f]/g, "");

removeAccent('Lê Trung Lực') // 'Le Trung Luc'