Bump to v4.17.12.

This commit is contained in:
John-David Dalton
2019-07-09 14:01:55 -07:00
parent 3e273e915d
commit 793f983629
13 changed files with 181 additions and 161 deletions

View File

@@ -3,7 +3,8 @@ var toInteger = require('./toInteger'),
toString = require('./toString');
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMin = Math.min;
var nativeIsFinite = root.isFinite,
nativeMin = Math.min;
/**
* Creates a function like `_.round`.
@@ -17,7 +18,7 @@ function createRound(methodName) {
return function(number, precision) {
number = toNumber(number);
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
if (precision) {
if (precision && nativeIsFinite(number)) {
// Shift with exponential notation to avoid floating-point issues.
// See [MDN](https://mdn.io/round#Examples) for more details.
var pair = (toString(number) + 'e').split('e'),