mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Make regexp var name singular.
This commit is contained in:
14
lodash.js
14
lodash.js
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user