@antv/util
Advanced tools
Comparing version 2.0.12 to 2.0.13
@@ -1,2 +0,1 @@ | ||
import each from './each'; | ||
import isArray from './is-array'; | ||
@@ -24,10 +23,6 @@ /** | ||
} | ||
var max = arr[0]; | ||
each(arr, function (val) { | ||
if (val > max) { | ||
max = val; | ||
} | ||
}); | ||
return max; | ||
return arr.reduce(function (prev, curr) { | ||
return Math.max(prev, curr); | ||
}, arr[0]); | ||
}); | ||
//# sourceMappingURL=max.js.map |
@@ -1,2 +0,1 @@ | ||
import each from './each'; | ||
import isArray from './is-array'; | ||
@@ -24,10 +23,6 @@ /** | ||
} | ||
var min = arr[0]; | ||
each(arr, function (val) { | ||
if (val < min) { | ||
min = val; | ||
} | ||
}); | ||
return min; | ||
return arr.reduce(function (prev, curr) { | ||
return Math.min(prev, curr); | ||
}, arr[0]); | ||
}); | ||
//# sourceMappingURL=min.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var each_1 = require("./each"); | ||
var is_array_1 = require("./is-array"); | ||
@@ -26,10 +25,6 @@ /** | ||
} | ||
var max = arr[0]; | ||
each_1.default(arr, function (val) { | ||
if (val > max) { | ||
max = val; | ||
} | ||
}); | ||
return max; | ||
return arr.reduce(function (prev, curr) { | ||
return Math.max(prev, curr); | ||
}, arr[0]); | ||
}); | ||
//# sourceMappingURL=max.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var each_1 = require("./each"); | ||
var is_array_1 = require("./is-array"); | ||
@@ -26,10 +25,6 @@ /** | ||
} | ||
var min = arr[0]; | ||
each_1.default(arr, function (val) { | ||
if (val < min) { | ||
min = val; | ||
} | ||
}); | ||
return min; | ||
return arr.reduce(function (prev, curr) { | ||
return Math.min(prev, curr); | ||
}, arr[0]); | ||
}); | ||
//# sourceMappingURL=min.js.map |
{ | ||
"name": "@antv/util", | ||
"version": "2.0.12", | ||
"version": "2.0.13", | ||
"description": "A common util collection for antv projects", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -25,9 +25,5 @@ import each from './each'; | ||
} | ||
let max = arr[0]; | ||
each(arr, val => { | ||
if (val > max) { | ||
max = val; | ||
} | ||
}); | ||
return max; | ||
return arr.reduce((prev, curr) => { | ||
return Math.max(prev, curr) | ||
}, arr[0]); | ||
}; |
@@ -25,9 +25,5 @@ import each from './each'; | ||
} | ||
let min = arr[0]; | ||
each(arr, (val) => { | ||
if (val < min) { | ||
min = val; | ||
} | ||
}); | ||
return min; | ||
return arr.reduce((prev, curr) => { | ||
return Math.min(prev, curr) | ||
}, arr[0]); | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
327894
6554