mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-01 18:11:20 +08:00
- Multi-AI competition mode (Qwen vs DeepSeek) - Binance Futures integration - AI self-learning mechanism - Professional web dashboard - Complete risk management system
21 lines
502 B
JavaScript
21 lines
502 B
JavaScript
export default function min(values, valueof) {
|
|
let min;
|
|
if (valueof === undefined) {
|
|
for (const value of values) {
|
|
if (value != null
|
|
&& (min > value || (min === undefined && value >= value))) {
|
|
min = value;
|
|
}
|
|
}
|
|
} else {
|
|
let index = -1;
|
|
for (let value of values) {
|
|
if ((value = valueof(value, ++index, values)) != null
|
|
&& (min > value || (min === undefined && value >= value))) {
|
|
min = value;
|
|
}
|
|
}
|
|
}
|
|
return min;
|
|
}
|