1 /** Used to escape characters for inclusion in compiled regexes. */
3 '0': 'x30', '1': 'x31', '2': 'x32', '3': 'x33', '4': 'x34',
4 '5': 'x35', '6': 'x36', '7': 'x37', '8': 'x38', '9': 'x39',
5 'A': 'x41', 'B': 'x42', 'C': 'x43', 'D': 'x44', 'E': 'x45', 'F': 'x46',
6 'a': 'x61', 'b': 'x62', 'c': 'x63', 'd': 'x64', 'e': 'x65', 'f': 'x66',
7 'n': 'x6e', 'r': 'x72', 't': 'x74', 'u': 'x75', 'v': 'x76', 'x': 'x78'
10 /** Used to escape characters for inclusion in compiled string literals. */
21 * Used by `_.escapeRegExp` to escape characters for inclusion in compiled regexes.
24 * @param {string} chr The matched character to escape.
25 * @param {string} leadingChar The capture group for a leading character.
26 * @param {string} whitespaceChar The capture group for a whitespace character.
27 * @returns {string} Returns the escaped character.
29 function escapeRegExpChar(chr, leadingChar, whitespaceChar) {
31 chr = regexpEscapes[chr];
32 } else if (whitespaceChar) {
33 chr = stringEscapes[chr];
38 module.exports = escapeRegExpChar;