Initial commit
This commit is contained in:
10
node_modules/d3-array/src/pairs.js
generated
vendored
Normal file
10
node_modules/d3-array/src/pairs.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export default function(array, f) {
|
||||
if (f == null) f = pair;
|
||||
var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n);
|
||||
while (i < n) pairs[i] = f(p, p = array[++i]);
|
||||
return pairs;
|
||||
}
|
||||
|
||||
export function pair(a, b) {
|
||||
return [a, b];
|
||||
}
|
||||
Reference in New Issue
Block a user