remove-accents
Simple helper to replace accented characters like éüàôç with their basic form (i.e. euaoc).
The first parameter should be a string
otherwhise it will be returned without processing.
The optional second parameter transforms result to lower case if set to true
.
Usage :
const {removeAccents} = require('@bernardsch/remove-accents');
const str = "J'étais fatigué.";
console.log(removeAccents(str, true));
Expected :
j'etais fatigue.