Initial commit
This commit is contained in:
16
node_modules/d3-hierarchy/src/array.js
generated
vendored
Normal file
16
node_modules/d3-hierarchy/src/array.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
export var slice = Array.prototype.slice;
|
||||
|
||||
export function shuffle(array) {
|
||||
var m = array.length,
|
||||
t,
|
||||
i;
|
||||
|
||||
while (m) {
|
||||
i = Math.random() * m-- | 0;
|
||||
t = array[m];
|
||||
array[m] = array[i];
|
||||
array[i] = t;
|
||||
}
|
||||
|
||||
return array;
|
||||
}
|
||||
Reference in New Issue
Block a user