Projekt

Obecné

Profil

Stáhnout (3.33 KB) Statistiky
| Větev: | Revize:
1
var basePropertyOf = require('./_basePropertyOf');
2

    
3
/** Used to map Latin Unicode letters to basic Latin letters. */
4
var deburredLetters = {
5
  // Latin-1 Supplement block.
6
  '\xc0': 'A',  '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
7
  '\xe0': 'a',  '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
8
  '\xc7': 'C',  '\xe7': 'c',
9
  '\xd0': 'D',  '\xf0': 'd',
10
  '\xc8': 'E',  '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
11
  '\xe8': 'e',  '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
12
  '\xcc': 'I',  '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
13
  '\xec': 'i',  '\xed': 'i', '\xee': 'i', '\xef': 'i',
14
  '\xd1': 'N',  '\xf1': 'n',
15
  '\xd2': 'O',  '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
16
  '\xf2': 'o',  '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
17
  '\xd9': 'U',  '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
18
  '\xf9': 'u',  '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
19
  '\xdd': 'Y',  '\xfd': 'y', '\xff': 'y',
20
  '\xc6': 'Ae', '\xe6': 'ae',
21
  '\xde': 'Th', '\xfe': 'th',
22
  '\xdf': 'ss',
23
  // Latin Extended-A block.
24
  '\u0100': 'A',  '\u0102': 'A', '\u0104': 'A',
25
  '\u0101': 'a',  '\u0103': 'a', '\u0105': 'a',
26
  '\u0106': 'C',  '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
27
  '\u0107': 'c',  '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
28
  '\u010e': 'D',  '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
29
  '\u0112': 'E',  '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
30
  '\u0113': 'e',  '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
31
  '\u011c': 'G',  '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
32
  '\u011d': 'g',  '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
33
  '\u0124': 'H',  '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
34
  '\u0128': 'I',  '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
35
  '\u0129': 'i',  '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
36
  '\u0134': 'J',  '\u0135': 'j',
37
  '\u0136': 'K',  '\u0137': 'k', '\u0138': 'k',
38
  '\u0139': 'L',  '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
39
  '\u013a': 'l',  '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
40
  '\u0143': 'N',  '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
41
  '\u0144': 'n',  '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
42
  '\u014c': 'O',  '\u014e': 'O', '\u0150': 'O',
43
  '\u014d': 'o',  '\u014f': 'o', '\u0151': 'o',
44
  '\u0154': 'R',  '\u0156': 'R', '\u0158': 'R',
45
  '\u0155': 'r',  '\u0157': 'r', '\u0159': 'r',
46
  '\u015a': 'S',  '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
47
  '\u015b': 's',  '\u015d': 's', '\u015f': 's', '\u0161': 's',
48
  '\u0162': 'T',  '\u0164': 'T', '\u0166': 'T',
49
  '\u0163': 't',  '\u0165': 't', '\u0167': 't',
50
  '\u0168': 'U',  '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
51
  '\u0169': 'u',  '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
52
  '\u0174': 'W',  '\u0175': 'w',
53
  '\u0176': 'Y',  '\u0177': 'y', '\u0178': 'Y',
54
  '\u0179': 'Z',  '\u017b': 'Z', '\u017d': 'Z',
55
  '\u017a': 'z',  '\u017c': 'z', '\u017e': 'z',
56
  '\u0132': 'IJ', '\u0133': 'ij',
57
  '\u0152': 'Oe', '\u0153': 'oe',
58
  '\u0149': "'n", '\u017f': 's'
59
};
60

    
61
/**
62
 * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
63
 * letters to basic Latin letters.
64
 *
65
 * @private
66
 * @param {string} letter The matched letter to deburr.
67
 * @returns {string} Returns the deburred letter.
68
 */
69
var deburrLetter = basePropertyOf(deburredLetters);
70

    
71
module.exports = deburrLetter;
(185-185/590)