1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-03 04:10:04 +02:00

update modules

This commit is contained in:
s2
2019-08-17 23:19:17 +02:00
parent 5166260592
commit ea913f84b8
14 changed files with 197 additions and 179 deletions

View File

@@ -1,9 +1,11 @@
var toInteger = require('./toInteger'),
var root = require('./_root'),
toInteger = require('./toInteger'),
toNumber = require('./toNumber'),
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 +19,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'),