Files
lan-manager/web/node_modules/@antv/util/esm/get-range.js
openclaw 0a5f6a8047 Initial commit: Lan-manager project code
- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs

Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
2026-04-20 00:52:58 +08:00

29 lines
812 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import isArray from './is-array';
import { default as getMax } from './max';
import { default as getMin } from './min';
var getRange = function (values) {
// 存在 NaN 时min,max 判定会出问题
var filterValues = values.filter(function (v) { return !isNaN(v); });
if (!filterValues.length) {
// 如果没有数值则直接返回0
return {
min: 0,
max: 0,
};
}
if (isArray(values[0])) {
var tmp = [];
for (var i = 0; i < values.length; i++) {
tmp = tmp.concat(values[i]);
}
filterValues = tmp;
}
var max = getMax(filterValues);
var min = getMin(filterValues);
return {
min: min,
max: max,
};
};
export default getRange;
//# sourceMappingURL=get-range.js.map