Move regexp used in _.parseInt to outside the method.

Former-commit-id: 5b93dcdff39089ed5467ba52040f2e352716c49e
This commit is contained in:
John-David Dalton
2013-03-10 00:30:58 -08:00
parent 8948fae780
commit 5456d4081b
7 changed files with 231 additions and 219 deletions

View File

@@ -30,16 +30,13 @@
/** Used internally to indicate various things */
var indicatorObject = {};
/** Used to match HTML entities */
var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g;
/** Used to match empty string literals in compiled template source */
var reEmptyStringLeading = /\b__p \+= '';/g,
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
/** Used to match regexp flags from their coerced string values */
var reFlags = /\w*$/;
/** Used to match HTML entities */
var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g;
/**
* Used to match ES6 template delimiters
@@ -47,9 +44,15 @@
*/
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
/** Used to match regexp flags from their coerced string values */
var reFlags = /\w*$/;
/** Used to match "interpolate" template delimiters */
var reInterpolate = /<%=([\s\S]+?)%>/g;
/** Used to match leading zeros to be removed */
var reLeadingZeros = /^0+(?=.$)/;
/** Used to ensure capturing order of template delimiters */
var reNoMatch = /($^)/;