8000 Rearrange regexp vars. · lodash/lodash@351236f · GitHub
[go: up one dir, main page]

Skip to content

Commit 351236f

Browse files
committed
Rearrange regexp vars.
1 parent 51ad056 commit 351236f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lodash.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@
130130
reTrimStart = /^\s+/,
131131
reTrimEnd = /\s+$/;
132132

133+
/** Used to match non-compound words composed of alphanumeric characters. */
134+
var reBasicWord = /[a-zA-Z0-9]+/g;
135+
133136
/** Used to match backslashes in property paths. */
134137
var reEscapeChar = /\\(\\)?/g;
135138

@@ -218,12 +221,6 @@
218221
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
219222
var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
220223

221-
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
222-
var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
223-
224-
/** Used to match non-compound words composed of alphanumeric characters. */
225-
var reBasicWord = /[a-zA-Z0-9]+/g;
226-
227224
/** Used to match complex or compound words. */
228225
var reComplexWord = RegExp([
229226
rsUpper + '?' + rsLower + '+(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
@@ -234,6 +231,9 @@
234231
rsEmoji
235232
].join('|'), 'g');
236233

234+
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
235+
var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
236+
237237
/** Used to detect strings that need a more robust regexp to match words. */
238238
var reHasComplexWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
239239

0 commit comments

Comments
 (0)
0