Bump to v4.16.0.

This commit is contained in:
John-David Dalton
2016-09-17 22:28:43 -07:00
parent 28663c1e27
commit 94ac73824f
102 changed files with 526 additions and 320 deletions

View File

@@ -1,12 +1,6 @@
import root from './_root.js';
import toString from './toString.js';
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
/** Used to detect hexadecimal string values. */
var reHasHexPrefix = /^0x/i;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeParseInt = root.parseInt;
@@ -35,15 +29,12 @@ var nativeParseInt = root.parseInt;
* // => [6, 8, 10]
*/
function parseInt(string, radix, guard) {
// Chrome fails to trim leading <BOM> whitespace characters.
// See https://bugs.chromium.org/p/v8/issues/detail?id=3109 for more details.
if (guard || radix == null) {
radix = 0;
} else if (radix) {
radix = +radix;
}
string = toString(string).replace(reTrim, '');
return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
return nativeParseInt(toString(string), radix || 0);
}
export default parseInt;