Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
5
node_modules/d3-array/src/map.js
generated
vendored
Normal file
5
node_modules/d3-array/src/map.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
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));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue