Bump to v4.16.0.

This commit is contained in:
John-David Dalton
2016-09-17 22:24:52 -07:00
parent fff78cbd5a
commit 0b9ddff408
102 changed files with 977 additions and 600 deletions

View File

@@ -1,11 +1,5 @@
define(['./_root', './toString'], function(root, toString) {
/** 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;
@@ -34,15 +28,12 @@ define(['./_root', './toString'], function(root, toString) {
* // => [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);
}
return parseInt;