Spaces:
Paused
Paused
Download node_modules/@plotly/d3/src/arrays/sum.js from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 346 Bytes
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/d3/src/arrays/sum.js
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/@plotly/d3/src/arrays/sum.js
-
curl -L -o sum.js https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/d3/src/arrays/sum.js
346 Bytes
| import "../math/number"; | |
| d3.sum = function(array, f) { | |
| var s = 0, | |
| n = array.length, | |
| a, | |
| i = -1; | |
| if (arguments.length === 1) { | |
| while (++i < n) if (d3_numeric(a = +array[i])) s += a; // zero and null are equivalent | |
| } else { | |
| while (++i < n) if (d3_numeric(a = +f.call(array, array[i], i))) s += a; | |
| } | |
| return s; | |
| }; | |