416 B
416 B
title, tags
| title | tags |
|---|---|
| removeAccents | string,beginner |
Removes accents from strings.
- Converts the string to a normalized Unicode format.
- The diacritical marks are represented by an Unicode range and are replaced by empty strings.
const removeAccents = string => string.normalize("NFD").replace(/[\u0300-\u036f]/g, "")
removeAccents('Antoine de Saint-Exupéry'); // 'Antoine de Saint-Exupery'