mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Bump to v4.16.2.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
var root = require('./_root'),
|
||||
toString = require('./toString');
|
||||
|
||||
/** Used to match leading and trailing whitespace. */
|
||||
var reTrimStart = /^\s+/;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeParseInt = root.parseInt;
|
||||
|
||||
@@ -34,7 +37,7 @@ function parseInt(string, radix, guard) {
|
||||
} else if (radix) {
|
||||
radix = +radix;
|
||||
}
|
||||
return nativeParseInt(toString(string), radix || 0);
|
||||
return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
|
||||
}
|
||||
|
||||
module.exports = parseInt;
|
||||
|
||||
Reference in New Issue
Block a user