Make regexp var name singular.

This commit is contained in:
John-David Dalton
2015-09-14 01:07:12 -07:00
parent fa61e30dd5
commit a2fe87a63a

View File

@@ -117,11 +117,9 @@
reIsPlainProp = /^\w*$/, reIsPlainProp = /^\w*$/,
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g; rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g;
/** /** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
* Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
*/ reHasRegExpChar = RegExp(reRegExpChar.source);
var reRegExpChars = /[\\^$.*+?()[\]{}|]/g,
reHasRegExpChars = RegExp(reRegExpChars.source);
/** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */ /** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */
var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g; var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g;
@@ -1319,7 +1317,7 @@
/** Used to detect if a method is native. */ /** Used to detect if a method is native. */
var reIsNative = RegExp('^' + var reIsNative = RegExp('^' +
fnToString.call(hasOwnProperty).replace(reRegExpChars, '\\$&') fnToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
); );
@@ -10418,8 +10416,8 @@
*/ */
function escapeRegExp(string) { function escapeRegExp(string) {
string = baseToString(string); string = baseToString(string);
return (string && reHasRegExpChars.test(string)) return (string && reHasRegExpChar.test(string))
? string.replace(reRegExpChars, '\\$&') ? string.replace(reRegExpChar, '\\$&')
: string; : string;
} }