File tree Expand file tree Collapse file tree 1 file changed +31
-34
lines changed Expand file tree Collapse file tree 1 file changed +31
-34
lines changed Original file line number Diff line number Diff line change 1- const deburrMap = new Map < string , string > (
2- // eslint-disable-next-line no-restricted-syntax
3- Object . entries ( {
4- Æ : 'Ae' ,
5- Ð : 'D' ,
6- Ø : 'O' ,
7- Þ : 'Th' ,
8- ß : 'ss' ,
9- æ : 'ae' ,
10- ð : 'd' ,
11- ø : 'o' ,
12- þ : 'th' ,
13- Đ : 'D' ,
14- đ : 'd' ,
15- Ħ : 'H' ,
16- ħ : 'h' ,
17- ı : 'i' ,
18- IJ : 'IJ' ,
19- ij : 'ij' ,
20- ĸ : 'k' ,
21- Ŀ : 'L' ,
22- ŀ : 'l' ,
23- Ł : 'L' ,
24- ł : 'l' ,
25- ʼn : "'n" ,
26- Ŋ : 'N' ,
27- ŋ : 'n' ,
28- Œ : 'Oe' ,
29- œ : 'oe' ,
30- Ŧ : 'T' ,
31- ŧ : 't' ,
32- ſ : 's' ,
33- } )
34- ) ;
1+ const deburrMap = new Map < string , string > ( [
2+ [ 'Æ' , 'Ae' ] ,
3+ [ 'Ð' , 'D' ] ,
4+ [ 'Ø' , 'O' ] ,
5+ [ 'Þ' , 'Th' ] ,
6+ [ 'ß' , 'ss' ] ,
7+ [ 'æ' , 'ae' ] ,
8+ [ 'ð' , 'd' ] ,
9+ [ 'ø' , 'o' ] ,
10+ [ 'þ' , 'th' ] ,
11+ [ 'Đ' , 'D' ] ,
12+ [ 'đ' , 'd' ] ,
13+ [ 'Ħ' , 'H' ] ,
14+ [ 'ħ' , 'h' ] ,
15+ [ 'ı' , 'i' ] ,
16+ [ 'IJ' , 'IJ' ] ,
17+ [ 'ij' , 'ij' ] ,
18+ [ 'ĸ' , 'k' ] ,
19+ [ 'Ŀ' , 'L' ] ,
20+ [ 'ŀ' , 'l' ] ,
21+ [ 'Ł' , 'L' ] ,
22+ [ 'ł' , 'l' ] ,
23+ [ 'ʼn' , "'n" ] ,
24+ [ 'Ŋ' , 'N' ] ,
25+ [ 'ŋ' , 'n' ] ,
26+ [ 'Œ' , 'Oe' ] ,
27+ [ 'œ' , 'oe' ] ,
28+ [ 'Ŧ' , 'T' ] ,
29+ [ 'ŧ' , 't' ] ,
30+ [ 'ſ' , 's' ] ,
31+ ] ) ;
3532
3633/**
3734 * Converts a string by replacing special characters and diacritical marks with their ASCII equivalents.
You can’t perform that action at this time.
0 commit comments