Files
lan-manager/web/node_modules/@antv/util/lib/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

31 lines
897 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.
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var is_array_1 = require("./is-array");
var max_1 = require("./max");
var min_1 = require("./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 (is_array_1.default(values[0])) {
var tmp = [];
for (var i = 0; i < values.length; i++) {
tmp = tmp.concat(values[i]);
}
filterValues = tmp;
}
var max = max_1.default(filterValues);
var min = min_1.default(filterValues);
return {
min: min,
max: max,
};
};
exports.default = getRange;
//# sourceMappingURL=get-range.js.map