mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Remove unused escapeRegExpChar function.
This commit is contained in:
18
lodash.js
18
lodash.js
@@ -487,24 +487,6 @@
|
|||||||
return htmlEscapes[chr];
|
return htmlEscapes[chr];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Used by `_.escapeRegExp` to escape characters for inclusion in compiled regexes.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {string} chr The matched character to escape.
|
|
||||||
* @param {string} leadingChar The capture group for a leading character.
|
|
||||||
* @param {string} whitespaceChar The capture group for a whitespace character.
|
|
||||||
* @returns {string} Returns the escaped character.
|
|
||||||
*/
|
|
||||||
function escapeRegExpChar(chr, leadingChar, whitespaceChar) {
|
|
||||||
if (leadingChar) {
|
|
||||||
chr = regexpEscapes[chr];
|
|
||||||
} else if (whitespaceChar) {
|
|
||||||
chr = stringEscapes[chr];
|
|
||||||
}
|
|
||||||
return '\\' + chr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by `_.template` to escape characters for inclusion in compiled string literals.
|
* Used by `_.template` to escape characters for inclusion in compiled string literals.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user