Download node_modules/d3-array/src/max.js from NKessler/Horizon: direct link, hf CLI and curl.
- Browser
- Download file 502 Bytes
-
https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-array/src/max.js
- Command line
-
hf download hf://NKessler/Horizon/node_modules/d3-array/src/max.js
-
curl -L -o max.js https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-array/src/max.js
502 Bytes
| export default function max(values, valueof) { | |
| let max; | |
| if (valueof === undefined) { | |
| for (const value of values) { | |
| if (value != null | |
| && (max < value || (max === undefined && value >= value))) { | |
| max = value; | |
| } | |
| } | |
| } else { | |
| let index = -1; | |
| for (let value of values) { | |
| if ((value = valueof(value, ++index, values)) != null | |
| && (max < value || (max === undefined && value >= value))) { | |
| max = value; | |
| } | |
| } | |
| } | |
| return max; | |
| } | |