1 var baseToString = require('../internal/baseToString'),
2 deburrLetter = require('../internal/deburrLetter');
4 /** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */
5 var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g;
7 /** Used to match latin-1 supplementary letters (excluding mathematical operators). */
8 var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
11 * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
12 * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
17 * @param {string} [string=''] The string to deburr.
18 * @returns {string} Returns the deburred string.
21 * _.deburr('déjà vu');
24 function deburr(string) {
25 string = baseToString(string);
26 return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
29 module.exports = deburr;