mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Document the radix argument of _.parseInt and ensure it ignores leading whitespace. [closes #254]
Former-commit-id: b1d0f7688402b3f41cfb030c63dcd097ba3f4e68
This commit is contained in:
7
build.js
7
build.js
@@ -1382,8 +1382,8 @@
|
||||
*/
|
||||
function removeVar(source, varName) {
|
||||
// simplify complex variable assignments
|
||||
if (/^(?:cloneableClasses|contextProps|ctorByClass|shadowedProps)$/.test(varName)) {
|
||||
source = source.replace(RegExp('(var ' + varName + ' *=)[\\s\\S]+?\\n\\n'), '$1=null;\n\n');
|
||||
if (/^(?:cloneableClasses|contextProps|ctorByClass|shadowedProps|whitespace)$/.test(varName)) {
|
||||
source = source.replace(RegExp('(var ' + varName + ' *=)[\\s\\S]+?;\\n\\n'), '$1=null;\n\n');
|
||||
}
|
||||
|
||||
source = removeFunction(source, varName);
|
||||
@@ -2915,7 +2915,8 @@
|
||||
}
|
||||
if (isRemoved(source, 'parseInt')) {
|
||||
source = removeVar(source, 'nativeParseInt');
|
||||
source = removeVar(source, 'reLeadingZeros');
|
||||
source = removeVar(source, 'reLeadingSpacesAndZeros');
|
||||
source = removeVar(source, 'whitespace');
|
||||
}
|
||||
if (isRemoved(source, 'template')) {
|
||||
// remove `templateSettings` assignment
|
||||
|
||||
Reference in New Issue
Block a user