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