Download node_modules/d3-array/src/map.js from NKessler/Horizon: direct link, hf CLI and curl.
- Browser
- Download file 310 Bytes
-
https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-array/src/map.js
- Command line
-
hf download hf://NKessler/Horizon/node_modules/d3-array/src/map.js
-
curl -L -o map.js https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-array/src/map.js
310 Bytes
| export default function map(values, mapper) { | |
| if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); | |
| if (typeof mapper !== "function") throw new TypeError("mapper is not a function"); | |
| return Array.from(values, (value, index) => mapper(value, index, values)); | |
| } | |